These forums are CLOSED. Please visit the new forums HERE
Distruction Script Needed |
|
Diamond Meness
Registered User
Join date: 17 Sep 2006
Posts: 12
|
10-05-2009 15:15
I need a script that when placed in an object...it will self distruct after a specific amount of time, while the avatar is still holding it...and the object will disappear from their hand as well as their inventory.
|
Argent Stonecutter
Emergency Mustelid
![]() Join date: 20 Sep 2005
Posts: 20,263
|
10-05-2009 15:16
Can't be done.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/
"And now I'm going to show you something really cool." Skyhook Station - http://xrl.us/skyhook23 Coonspiracy Store - http://xrl.us/coonstore |
Kenda Raymaker
Registered User
Join date: 29 Sep 2008
Posts: 2
|
10-06-2009 11:10
indeed. there is no function to remove an object from someone's inventory. the best you could to is remove object functionality by causing a script lockup at the end of functional life. This can also trigger a detach from the avatar at the end of functional life, and whenever the user tries to re-attach the object while in a lockup state, it instantly detaches again, or on rez on the ground can kill it's self, making the object totally useless to even keep around.
|
Steven Broderick
Scripter / Builder
Join date: 14 Sep 2008
Posts: 20
|
Basic Scirpt, Modify at will.
10-06-2009 12:08
Here is a basic script of what Kenda suggested. It should work, but I'll admit I havent tried it. Feel free to change it as needed.
float TimeDelayInSeconds = 30; default { state_entry() { llRequestPermissions(llGetOwner(),PERMISSION_ATTACH); } run_time_permissions(integer permissions) { if(permissions & PERMISSION_ATTACH) state Alive; } } state Alive { state_entry() { llSetTimerEvent(TimeDelayInSeconds); } timer() { state Dead; } } state Dead { attach(key attached) { if(attached) llDetachFromAvatar(); } state_entry() { if(llGetAttached() != 0) llDetachFromAvatar(); else llDie(); } on_rez(integer start_param) { llDie(); } } |
Diamond Watkins
Registered User
Join date: 23 May 2008
Posts: 1
|
10-12-2009 11:50
Thanks so much everyone..I will try this to see if it works.
|