llSetTimerEvent(float sec)
Sets the
timer event to be triggered every
sec seconds. Passing
0.0 (or just 0) stops further timer events.
The timer persists over
state changes, but gets removed when the
script is
reset.
It should be noted that, perhaps due to event delay, you can't get more than 25 timer events per second. And so setting the interval lower than 0.04 has no real effect, except filling up the event queue.
Calling llSetTimerEvent replaces any existing timer value, and resets the countdown. In other words, if you call llSetTimerEvent(n) every n-1 seconds, the timer() event will never fire.
To stop the timer, call llSetTimerEvent(0.0). It's good practise to do this in the state_exit() event of any state which uses a timer to avoid unintentionally having a timer running in the next state.
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
functions |
events |
timer