Difference between revisions of "LlSetScriptState"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
{{LSL_Function/inventory|name|uuid=false|type=script}}
{{Issues/SVC-1853}}{{LSL_Function/inventory|name|uuid=false|type=script}}
{{LSL_Function
{{LSL_Function
|func_id=148|func_sleep=0.0|func_energy=10.0
|func_id=148|func_sleep=0.0|func_energy=10.0
Line 27: Line 27:
|also_articles
|also_articles
|notes
|notes
|issues=
|issues
{{Issue|SVC-1853|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.|type=bug|status=reop}}
|cat1=Script
|cat1=Script
|cat2
|cat2

Revision as of 11:21, 25 October 2008

Summary

Function: llSetScriptState( string name, integer run );

Set the running state of the script name.

• string name a script in the inventory of the prim this script is in
• 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.
All Issues ~ Search JIRA for related Bugs

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

Deep Notes

All Issues

~ Search JIRA for related Issues
   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.

Signature

function void llSetScriptState( string name, integer run );