FANDOM


Timers can be used to either perform periodic tasks or simply delayed tasks. For example, a repeating task might be used to drive an animation. A delayed task might be something where you need to so something 10 seconds after some event happens, for example.

Attributes Edit

interval Edit

This controls how often the timer fires. It is expressed in floating point seconds.

ticking Edit

This controls whether the timer is currently running or not. You can use this to temporarily disable a timer when it is not needed.

onTimerFired Edit

This is the action that is carried out when the timer fires at each interval.

Methods Edit

reset() Edit

The reset() method can be used to simply start the timer interval over. For example, if you have a timer that fires 10 seconds after the user types a key, each time the user types a key, you can merely reset your timer. The countdown will start back at 0.

<timer name="speakTimer">
  <interval>0.1</interval>
  <ticking>false</ticking>
<onTimerFired>speakOutput();</onTimerFired>
</timer>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.