[Opensim-users] NPC not getting removed as expected

Dr Ramesh Ramloll r.ramloll at gmail.com
Wed May 1 11:48:53 UTC 2013


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


On Wed, May 1, 2013 at 1:37 AM, dz <dz at bitzend.net> wrote:

> Date: Tue, 30 Apr 2013 17:10:34 -0400
> From: Dr Ramesh Ramloll <r.ramloll at gmail.com>
> To: opensim-users <opensim-users at lists.berlios.de>
> Subject: Re: [Opensim-users] NPC not getting removed as expected
> Message-ID:
>         <
> CAHi41xK6v-qPH9rCc0+pDunHOPcB7UO6VOSs7QeCVrwnfd1+9w at 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
> Opensim-users at lists.berlios.de
> 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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20130501/3789c7cc/attachment.html>


More information about the Opensim-users mailing list