Trigger API Reference DCEI Events Timer0 - BLKTower/TestWiki 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 TriggerAddTimerEventElapsed(TypedCallback trigger, float time, bool useRealTime, bool simple)

Description

This event triggers when the timer has elapsed.

Parameters

  • 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.

Example Usage

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

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

void OnMapStart(TypedCallback trigger) {void-OnMapStartTypedCallback-trigger}

void OnMapStart(TypedCallback trigger)

Description

This event triggers on map start.

Parameters

  • object trigger the callback function that is run when the event is triggered.

Example Usage

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)

Description

This event triggers periodically on a timer, for the given number of times.

Parameters

  • 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.

Example Usage

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)

Description

This event triggers periodically on a timer, for an indefinite number of times.

Parameters

  • 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.

Example Usage

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

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

⚠️ **GitHub.com Fallback** ⚠️