Timer

From Second Life Wiki
Revision as of 19:29, 17 December 2007 by Tex Armistice (talk | contribs)
Jump to navigation Jump to search

Description

Event: timer( ){ ; }

Repeats the code in the timer(). Result of the llSetTimerEvent library function call.


Caveats

  • The timer event is adversly effected by time dilation.
  • Only one timer can be active at one time.
  • The timer survives state changes, but does not survive resets.
All Issues ~ Search JIRA for related Bugs

Examples

float gap = 2.0;
float counter = 0.0;

default
{
    state_entry()
    {
        // Activate the timer listener every 2 seconds
        llSetTimerEvent(gap);
    }

    timer()
    {
        counter = counter + gap; 
        llSay(0, (string)counter+" seconds have passed");
    }
}

See Also

Functions

•  llSetTimerEvent

Deep Notes

Signature

event void timer(  );