LSL Wiki Mirror 10-5-2006: llSetScriptState

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
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:
// Stops 'ScriptName' (in the prim's inventory)
llSetScriptState("ScriptName", FALSE);

// Start 'ScriptName' (in the prim's inventory)
llSetScriptState("ScriptName", TRUE);

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:

Also see llGetScriptState.


Functions | Inventory | Script | State
There are 2 comments on this page. [Display comments/form]