Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Q: LSL Delete script w/o deleting object? (or end script?)

Hiro Pendragon
bye bye f0rums!
Join date: 22 Jan 2004
Posts: 5,905
09-10-2004 01:00
Is there a command in LSL to delete the script and not the object that the script resides? (Can I use the delete inventory LSL command to do this?)

For that matter, can I just return out of the default state to end the script?
_____________________
Hiro Pendragon
------------------
http://www.involve3d.com - Involve - Metaverse / Emerging Media Studio

Visit my SL blog: http://secondtense.blogspot.com
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
09-10-2004 01:05
llRemoveInventory(llGetScriptName());

llSetScriptState(llGetScriptName(),FALSE);
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
09-10-2004 01:14
Hmm according to the wiki llSetScriptState may only work for other scripts. I'll check it out when I get IW. But you can always jump into a state of no return... just make an empty state and jump into that.
It wont release the memory occupied by the script though. Maybe you can have a lightweight companion script that just turns your other script off.
I have used llRemoveInventory successfully in the past though :)
Hiro Pendragon
bye bye f0rums!
Join date: 22 Jan 2004
Posts: 5,905
09-10-2004 13:49
Roger that, Eggy. Thanks. I think this will allow me to make better customizer vendors for some of my products...
_____________________
Hiro Pendragon
------------------
http://www.involve3d.com - Involve - Metaverse / Emerging Media Studio

Visit my SL blog: http://secondtense.blogspot.com