LlResetScript: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Strife Onizuka (talk | contribs)
m LSL llResetScript moved to LlResetScript: removing prefix
m lsl code tagging
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
|func_id=163|func_sleep=0.0|func_energy=10.0
|func_id=163|func_sleep=0.0|func_energy=10.0
|func=llResetScript
|func=llResetScript
|func_footnote
|func_footnote=On script reset...
*The current event/function is exited without further execution or return.
*All global variables are set to their defaults
*The event queue is cleared.
*The [[default]] state is set as the active state
**If it has a [[state_entry]] event, then it is queued.
|func_desc=Resets the script.
|func_desc=Resets the script.
|return_text
|return_text
Line 8: Line 13:
|caveats
|caveats
|constants
|constants
|examples
|examples=
<lsl>
default
{
    state_entry()
    {
        // Script initialization here
    }
 
    on_rez(integer start_param)
    {
        // Reset script when the object is rezzed
        llResetScript();
    }
}
</lsl>
|helpers
|helpers
|also_functions=*{{LSLG|llResetOtherScript}}
|also_functions=*{{LSLG|llResetOtherScript}}

Revision as of 12:31, 31 March 2008

Summary

Function: llResetScript( );
0.0 Forced Delay
10.0 Energy

Resets the script.

On script reset...

  • The current event/function is exited without further execution or return.
  • All global variables are set to their defaults
  • The event queue is cleared.
  • The default state is set as the active state

Examples

<lsl> default {

   state_entry()
   {
       // Script initialization here
   }
   on_rez(integer start_param)
   {
       // Reset script when the object is rezzed
       llResetScript();
   }

}

</lsl>

See Also

Functions

Deep Notes

Signature

function void llResetScript();