CreateDataTimer Function

Creates a timer associated with a new datapack, and returns the datapack.

Handle CreateDataTimer(float interval, Timer func, Handle &datapack, int flags)

Parameters

float interval

Interval from the current game time to execute the given function.

Timer func

Function to execute once the given interval has elapsed.

Handle& datapack

The newly created datapack is passed though this by-reference parameter to the timer callback function.

int flags

Timer flags.

Return Value

Handle to the timer object. You do not need to call CloseHandle().

Notes

The datapack is automatically freed when the timer ends.

The position of the datapack is not reset or changed for the timer function.