llSetScriptState(string name, integer run)
Controls the
script name in the
inventory of the
prim that
calls this
function. Setting
run to
TRUE enables that script;
FALSE disables it.
This function allows toggling the "Running" checkbox of a script in the same prim. Note that this has nothing to do with
states in
LSL.
NOTE: This function can also be called to disable the script it is in, however, the next line or two will be executed after the call, unless
llSleep is used.
Example:
While this function can be used to stop any script, it can only be used to
start scripts which were stopped by an
llSetScriptState function call. The following two cases are the primary reasons why a script cannot be started with this function:
Also see
llGetScriptState.
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Inventory |
Script |
State