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.
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 three cases are the primary reasons why a script cannot be started with this function:
- The stopped script was stopped because of an error.
- The stopped script is stopped because the "Running" box is unchecked.
- The stopped script is stopped because it was added to the object directly from another object (via llGiveInventory). Use llRemoteLoadScriptPin instead.
Also see
llGetScriptState.
Functions |
Inventory |
Script |
State