Jump to content

removing/deleting worn object


Raena Parx
 Share

You are about to reply to a thread that has been inactive for 2739 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi All.  I have an object that animates an avatar on attachment using   attach(key id).

Can someone tell me the best way I can remove and delete this object so it no longer exists after it's done animating?

(Not on avatar and not in avi's inventory).  I've tried a LOT of trial and errors, but I am NOT a scripter, just a builder, and have still not found the solution.

 

Thank you so much.

 

 

 

Link to comment
Share on other sites

Not really.  If you attach an item from inventory, it detaches back to inventory.  If you are trying to attach something that is already in world, you can't do it unless you own the object.  You can fake it by scripting that object to be a rezzer, though.  When a user clicks, it rezzes a copy of itself and immediately requests PERMISSION_ATTACH.  When it receives permission, it attaches with llAttachToAvatarTemp, which effectively changes ownership temporarily but does not allow the user to detach it to her inventory.  The script than requests PERMISSION_ATTACH|PERMISSION_TRIGGER_ANIMATION to get permission from the new "owner" to start and animation and (later) detach the object.  There's an example script in the LSL wiki at llAttachToAvatarTemp.

This sequence is much easier if you are working in an Experience, of course, because once the user has accepted the Experience you don't need to request her permissions every time.  You can then script "autoattach" temp items using the strategy above and the user has no idea how it's done.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2739 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...