Trigger API Reference\DCEI Events\Timer

TriggerHandle TriggerAddTimerEventElapsed(TypedCallback trigger, float time, bool useRealTime = False, bool simple = False)

TriggerHandle TriggerAddTimerEventElapsed(TypedCallback trigger, float time, bool useRealTime = False, bool simple = False)

Description


This event triggers when the timer has elapsed. Particularly if you need to pause or destroy a timer before it elapses, you will want to use Core timers instead.

For more examples of when different times of waits or timers should be used, see this notion guide.

Parameters

Example Usage

DCEI.TriggerAddTimerEventElapsed(OnTimer, 5, false, true)

function OnTimer()
    DCEI.LogMessage("Timer Ended")
end

TriggerHandle OnMapStart(TypedCallback trigger)

TriggerHandle OnMapStart(TypedCallback trigger)

Description


This event triggers on map start.

Parameters

Example Usage

DCEI.OnMapStart(A)

function A()
    DCEI.LogMessage("A")
end

TriggerHandle TriggerAddTimerEventPeriodic(TypedCallback trigger, float period, int lifeCount, bool useRealTime = False, bool simple = False)

TriggerHandle TriggerAddTimerEventPeriodic(TypedCallback trigger, float period, int lifeCount, bool useRealTime = False, bool simple = False)

Description


This event triggers periodically on a timer, for the given number of times. In most cases, you will want to use Core timers instead.

For more examples of when different times of waits or timers should be used, see this notion guide.

Parameters

Example Usage

function A()
    DCEI.LogMessage("A")
end

DCEI.TriggerAddTimerEventPeriodic(A, 1, 15, false, true)

TriggerHandle TriggerAddTimerEventPeriodicIndefinite(TypedCallback trigger, float period, bool useRealTime = False, bool simple = False)

TriggerHandle TriggerAddTimerEventPeriodicIndefinite(TypedCallback trigger, float period, bool useRealTime = False, bool simple = False)

Description


This event triggers periodically on a timer, for an indefinite number of times. In most cases, you will want to use Core timers instead.

For more examples of when different times of waits or timers should be used, see this notion guide.

Parameters

Example Usage

function A()
    DCEI.LogMessage("A")
end

DCEI.TriggerAddTimerEventPeriodicIndefinite(A, 1, false, true)