<div dir="ltr">Thanks dz I will definitely try your suggestion. Thank you. </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 1, 2013 at 1:37 AM, dz <span dir="ltr"><<a href="mailto:dz@bitzend.net" target="_blank">dz@bitzend.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div style="margin-left:40px">Date: Tue, 30 Apr 2013 17:10:34 -0400<br>
From: Dr Ramesh Ramloll <<a href="mailto:r.ramloll@gmail.com" target="_blank">r.ramloll@gmail.com</a>><br>
To: opensim-users <<a href="mailto:opensim-users@lists.berlios.de" target="_blank">opensim-users@lists.berlios.de</a>><br>
Subject: Re: [Opensim-users] NPC not getting removed as expected<br>
Message-ID:<br>
<<a href="mailto:CAHi41xK6v-qPH9rCc0%2BpDunHOPcB7UO6VOSs7QeCVrwnfd1%2B9w@mail.gmail.com" target="_blank">CAHi41xK6v-qPH9rCc0+pDunHOPcB7UO6VOSs7QeCVrwnfd1+9w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<div class="im"><br>
<br>
Hello,<br>
Before I file a mantis report, try wearing an attachment with this trivial<br>
script<br>
<br>
default<br>
{<br>
touch_start(integer i){<br>
osNpcRemove(llGetOwner());<br>
}<br>
}<br>
<br>
clone youself, then create an NPC using the example script here NPC<br>
Automator script<br>
<a href="http://opensimulator.org/wiki/OSSLNPC" target="_blank">http://opensimulator.org/wiki/OSSLNPC</a><br>
<br>
Let me know if others are getting the same behavior, the NPC is expected to<br>
delete itself when attachment is clicked.<br><br></div></div>I filed a Mantis on this behavior when the NPC functions were released.<br></div>I cannot find it now, large numbers of reports seem to have been removed.<br></div>
The call to GetOwner() does not return the correct UUID for the NPC<br>
<br></div>The workaround is to add code to handle the attached event<br><br> attach(key id) {<br> Initialize(id);<br> }<br><br></div>The key returned as id in this function is always the key of the avatar/NPC the item is attached to.<br>
</div>This script should do what you expect.<br><div><br>key NPC = NULL_KEY; <br>
default<br>
{<br>
touch_start(integer i){<br>
osNpcRemove(NPC);<br>
}<br><br> attach(key id) {<br> NPC=id;<br> }<br>
}<br>
<br><div><div><br></div></div></div></div>
<br>_______________________________________________<br>
Opensim-users mailing list<br>
<a href="mailto:Opensim-users@lists.berlios.de">Opensim-users@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-users" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><font color="#999999">'Consider how the lilies grow. They do not labor or spin.'</font><br>
<b>Rameshsharma Ramloll</b> PhD, CEO CTO DeepSemaphore LLC, Affiliate <i>Research Associate Professor</i>, Idaho State University, Pocatello, ID 83209 Tel: 208-240-0040<br><div><a href="http://deepsemaphore.posterous.com/" target="_blank">Blog</a>, <a href="http://www.linkedin.com/in/rameshramloll" target="_blank">LinkedIn</a>, <a href="http://www.deepsemaphore.com" target="_blank">DeepSemaphore LLC</a>, <a href="https://plus.google.com/103652369558830540272/about" target="_blank">Google+ profile</a></div>
</div>