Thanks dz I will definitely try your suggestion. Thank you.

On Wed, May 1, 2013 at 1:37 AM, dz <[email protected]> wrote:

> Date: Tue, 30 Apr 2013 17:10:34 -0400
> From: Dr Ramesh Ramloll <[email protected]>
> To: opensim-users <[email protected]>
> Subject: Re: [Opensim-users] NPC not getting removed as expected
> Message-ID:
>         <
> cahi41xk6v-qph9rcc0+pdunhopcb7uo6voss7qecvrwnfd1...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> Hello,
> Before I file a mantis report, try wearing an attachment with this trivial
> script
>
> default
> {
>     touch_start(integer i){
>         osNpcRemove(llGetOwner());
>     }
> }
>
> clone youself, then create an NPC using the example script here NPC
> Automator script
> http://opensimulator.org/wiki/OSSLNPC
>
> Let me know if others are getting the same behavior, the NPC is expected to
> delete itself when attachment is clicked.
>
> I filed a Mantis on this behavior when the NPC functions were released.
> I cannot find it now, large numbers of reports seem to have been removed.
> The call to GetOwner() does not return the correct UUID for the NPC
>
> The workaround is to add code to handle the attached event
>
>     attach(key id) {
>         Initialize(id);
>     }
>
> The key returned as id in this function is always the key of the
> avatar/NPC the item is attached to.
> This script should do what you expect.
>
> key NPC = NULL_KEY;
> default
> {
>     touch_start(integer i){
>         osNpcRemove(NPC);
>     }
>
>     attach(key id) {
>         NPC=id;
>     }
> }
>
>
>
> _______________________________________________
> Opensim-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/opensim-users
>



-- 
'Consider how the lilies grow. They do not labor or spin.'
*Rameshsharma Ramloll* PhD, CEO CTO DeepSemaphore LLC, Affiliate *Research
Associate Professor*, Idaho State University, Pocatello, ID 83209 Tel:
208-240-0040
Blog <http://deepsemaphore.posterous.com/>,
LinkedIn<http://www.linkedin.com/in/rameshramloll>
, DeepSemaphore LLC <http://www.deepsemaphore.com>, Google+
profile<https://plus.google.com/103652369558830540272/about>
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users

Reply via email to