llSetScriptState
Revision as of 01:54, 4 January 2014 by Strife Onizuka (talk | contribs)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Caveats
- If name is missing from the prim's inventory or it is not a script then an error is shouted on DEBUG_CHANNEL.
- Cannot be used to restart a script that has encountered a run-time error.
- Cannot be used to start a script that has been added via llGiveInventory. Scripts sent via llRemoteLoadScriptPin, and which have the running state set FALSE by that command, may be started.
- The script appears to stop when its time slice ends, not sooner. If a script tries to stop itself then some LSL code following the llSetScriptState call may be executed before the script stops.
- If a script is paused by llSetScriptState and is then either re-rezzed, in a region during a restart, or moved into a different region, the script's memory is reset.
Examples
<lsl>//Stops the Script, at some non-deterministic time later, until invoked with TRUE, in another script llSetScriptState(llGetScriptName(),FALSE); // Stall until end of time slice llSleep(0.1);</lsl> <lsl>//Starts Another Script
llSetScriptState("somescript",TRUE);</lsl>See Also
Functions
• | llGetScriptState | |||
• | llResetOtherScript |