Trigger API Reference DCEI Events Timer0 - funovus/editor-wiki GitHub Wiki
Table of Contents
- [Trigger API Reference\DCEI Events\Timer](#trigger-api-referencedcei-eventstimer)
* [void TriggerAddTimerEventElapsed(TypedCallback trigger, float time, bool useRealTime, bool simple)](#void-triggeraddtimereventelapsedtypedcallback-trigger-float-time-bool-userealtime-bool-simple)
* [void OnMapStart(TypedCallback trigger)](#void-onmapstarttypedcallback-trigger)
* [void TriggerAddTimerEventPeriodic(TypedCallback trigger, float period, int lifeCount, bool useRealTime, bool simple)](#void-triggeraddtimereventperiodictypedcallback-trigger-float-period-int-lifecount-bool-userealtime-bool-simple)
* [void TriggerAddTimerEventPeriodicIndefinite(TypedCallback trigger, float period, bool useRealTime, bool simple)](#void-triggeraddtimereventperiodicindefinitetypedcallback-trigger-float-period-bool-userealtime-bool-simple)
|
Trigger API Reference\DCEI Events\Timer {Trigger-API-ReferenceDCEI-EventsTimer}
void TriggerAddTimerEventElapsed(TypedCallback trigger, float time, bool useRealTime, bool simple) {void-TriggerAddTimerEventElapsedTypedCallback-trigger-float-time-bool-useRealTime-bool-simple}
void TriggerAddTimerEventElapsed(TypedCallback trigger, float time, bool useRealTime, bool simple)
This event triggers when the timer has elapsed.
-
object
trigger
the callback function that is run when the event is triggered. -
float
time
the amount of time the timer runs for. -
bool
useRealTime
if true, uses real time instead of game time. -
bool
simple
this flag reduces overhead by preventing the usage of DCEI.Wait() within the trigger. You should only set this to true if the trigger does not utilize DCEI.Wait() at all.
DCEI.TriggerAddTimerEventElapsed(OnTimer, 5, false, true)
function OnTimer()
DCEI.LogMessage("Timer Ended")
end
void OnMapStart(TypedCallback trigger)
This event triggers on map start.
DCEI.OnMapStart(A)
function A()
DCEI.LogMessage("A")
end
void TriggerAddTimerEventPeriodic(TypedCallback trigger, float period, int lifeCount, bool useRealTime, bool simple) {void-TriggerAddTimerEventPeriodicTypedCallback-trigger-float-period-int-lifeCount-bool-useRealTime-bool-simple}
void TriggerAddTimerEventPeriodic(TypedCallback trigger, float period, int lifeCount, bool useRealTime, bool simple)
This event triggers periodically on a timer, for the given number of times.
-
object
trigger
the callback function that is run when the event is triggered. -
float
period
the amount of time between each trigger call. -
int
lifeCount
the number of times the trigger is called. -
bool
useRealTime
if true, uses real time instead of game time. -
bool
simple
this flag reduces overhead by preventing the usage of DCEI.Wait() within the trigger. You should only set this to true if the trigger does not utilize DCEI.Wait() at all.
function A()
DCEI.LogMessage("A")
end
DCEI.TriggerAddTimerEventPeriodic(A, 1, 15, false, true)
void TriggerAddTimerEventPeriodicIndefinite(TypedCallback trigger, float period, bool useRealTime, bool simple) {void-TriggerAddTimerEventPeriodicIndefiniteTypedCallback-trigger-float-period-bool-useRealTime-bool-simple}
void TriggerAddTimerEventPeriodicIndefinite(TypedCallback trigger, float period, bool useRealTime, bool simple)
This event triggers periodically on a timer, for an indefinite number of times.
-
object
trigger
the callback function that is run when the event is triggered. -
float
period
the amount of time between each trigger call. -
bool
useRealTime
if true, uses real time instead of game time. -
bool
simple
this flag reduces overhead by preventing the usage of DCEI.Wait() within the trigger. You should only set this to true if the trigger does not utilize DCEI.Wait() at all.
function A()
DCEI.LogMessage("A")
end
DCEI.TriggerAddTimerEventPeriodicIndefinite(A, 1, false, true)