Timer
From Second Life Wiki
| Languages: |
English • Deutsch • Español • ελληνικά • Français • עברית • Italiano • 日本語 • 한국어 • Nederlands • Magyar • Norsk • Dansk • Svenska • Türkçe • Polski • Português • Русский • украї́нська • 中文(简体) • 中文(繁體) |
| Volunteer translated pages are linked in blue, Google translated pages are linked in grey. Learn how to provide volunteer translations. | |
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Tutorials |
Caveats
- The time between timer events can be longer than that specified with llSetTimerEvent, this is caused by:
- Time dilation - See llGetRegionTimeDilation for more information.
- Default event delay - Only so many events can be triggered per second.
- Event Execution - If the execution of an event takes too long.
- Only one timer can be active at one time.
- The timer survives state changes, but does not survive resets.
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"); } }
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.

