[Opensim-users] NPC not getting removed as expected

Justin Clark-Casey jjustincc at googlemail.com
Fri May 3 19:57:47 UTC 2013


I would consider that llGetOwner() behaviour with NPCs to be a bug - it should be returning the NPCs own ID.  The 
osNpcGetOwner() function is available if one wants to know which avatar spawned an owned NPC.

Indeed, it's already the case that regression tests check that the attachment objects themselves are correctly 'owned' 
by the avatar but this wasn't done for items within objects.

On 01/05/13 15:04, Dr Ramesh Ramloll wrote:
> And sadly the attach() function does not seem to be producing the right UUID for the NPC as well ... this is what I get
> when trying to have an NPC say its UUID
> My UUID is 00000000-0000-0000-0000-000000000000
> I think the problem lies elsewhere for the NPC removal part, because all the other functions are working fine e.g. sit
> on taget, moving to some point etc etc
>
>
> On Wed, May 1, 2013 at 9:43 AM, Dr Ramesh Ramloll <r.ramloll at gmail.com <mailto:r.ramloll at gmail.com>> wrote:
>
>     Just a note here to state something baffling to me ...
>
>     the code snippet you provided does not compile, it gives an error:
>     (0,0):Error: /usr/local/node/opensim2/Opensim.Region.ScriptEngine.SharedApi.Runtime.dll error (Location of the
>     symbol related to previous warning)
>
>     I just needed to change the variable NPC to something else for it to compile ... I can't understand this.
>
>     R
>
>
>     On Wed, May 1, 2013 at 7:48 AM, Dr Ramesh Ramloll <r.ramloll at gmail.com <mailto:r.ramloll at gmail.com>> wrote:
>
>         Thanks dz I will definitely try your suggestion. Thank you.
>
>
>         On Wed, May 1, 2013 at 1:37 AM, dz <dz at bitzend.net <mailto:dz at bitzend.net>> wrote:
>
>             Date: Tue, 30 Apr 2013 17:10:34 -0400
>             From: Dr Ramesh Ramloll <r.ramloll at gmail.com <mailto:r.ramloll at gmail.com>>
>             To: opensim-users <opensim-users at lists.berlios.de <mailto: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
>             <mailto:CAHi41xK6v-qPH9rCc0%2BpDunHOPcB7UO6VOSs7QeCVrwnfd1%2B9w 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 <mailto: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 <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>
>
>
>
>
>     --
>     '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 <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>
>
>
>
>
> --
> '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
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>


-- 
Justin Clark-Casey (justincc)
OSVW Consulting
http://justincc.org
http://twitter.com/justincc



More information about the Opensim-users mailing list