The Timer module lets you execute pieces of script with a delay and optionally multiple times.
Overview
Functions
SetTimer
Creates and starts a timer using the given variables.
Syntax:
Required arguments
- function: A LUA function to be called each time the timer ticks
- interval: The amount of time in milliseconds between each tick
- timesToExecute: The amount of times to run the function, use 0 for infinite
Optional arguments
Note: The arguments between [brackets] are optional and you can leave them out.
- params: Paramaters you wish to pass to the function the timer will call on each tick
Example:
RemoveTimer
Removes an existing timer.
Required arguments
- timer: The timer to remove
Example: