LlSetScriptState

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Buggy
Function: llSetScriptState( string name, integer run );
148 Function ID
0.0 Delay
10.0 Energy

Set the running state of the script name.

• string name a script in the prim's inventory
• integer run boolean, if FALSE the script will be disabled.

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 encoutered a run-time error.
  • 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.

Important Issues

~ Search JIRA for related Bugs
Bug - A problem which impairs or prevents the functions of the product. Reopened - This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.    Scripts deactivated by llSetScriptState are reset when the region is reset, when they are taken into inventory and re-rezzed and when crossing sim boundaries.

Examples

//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);

//Starts Another Script
llSetScriptState("somescript",TRUE);

See Also

Functions

•  llGetScriptState
•  llResetOtherScript

Deep Notes

Issues

~ Search JIRA for related Issues
Bug - A problem which impairs or prevents the functions of the product. Reopened - This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.    Scripts deactivated by llSetScriptState are reset when the region is reset, when they are taken into inventory and re-rezzed and when crossing sim boundaries.
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
In other languages