Method Global:CreateLuaEvent [-] [+]
Registers a global timed event.
When the passed function is called, the parameters (eventId, delay, repeats) are passed to it.
Repeats will decrease on each call if the event does not repeat indefinitely
Synopsis
eventId = CreateLuaEvent( function, delay )
eventId = CreateLuaEvent( function, delaytable )
eventId = CreateLuaEvent( function, delay, repeats )
eventId = CreateLuaEvent( function, delaytable, repeats )
Arguments
function functionFunction to trigger when the time has passed.
number delaySet time in milliseconds for the event to trigger.
Valid numbers: integers from 0 to 4,294,967,295.
table delaytableA table
{min, max}containing the minimum and maximum delay time.
number repeats (1)How many times for the event to repeat, 0 is infinite.
Valid numbers: integers from 0 to 4,294,967,295.
Returns
number eventIdUnique ID for the timed event used to cancel it or nil.
Valid numbers: integers from -2,147,483,647 to 2,147,483,647.