# Time Elapsed
Grammar — Elapsed time is dur|Time timeType|Real/Game/AI Time seconds
Flags —Native
|Event
This event fires once the specified amount of time has passed in game.
# Arguments
fixed
— Durationint
<preset::TimeType> — Time Type
Returns — void
native void TriggerAddEventTimeElapsed(
trigger inTrigger,
fixed inTime,
int inTimeType,
);
# Related
Category: Timer / Timers
- Set Score Timer —
void
— SetScoreTimer - Time Elapsed —
void
— TriggerAddEventTimeElapsed - Periodic Event —
void
— TriggerAddEventTimePeriodic - Start Timer —
void
— TimerStart - Last Started Timer —
timer
— TimerLastStarted - Restart Timer —
void
— TimerRestart - Pause/Unpause Timer —
void
— TimerPause - Stop Timer —
void
— libNtve_gf_StopTimer - Timer Is Paused —
bool
— TimerIsPaused - New Timer —
timer
— TimerCreate - Duration Of Timer —
fixed
— TimerGetDuration - Timer Expires —
void
— TriggerAddEventTimer - Triggering Timer —
timer
— EventTimer
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:17583
void gt_EndofTime_Init () {
gt_EndofTime = TriggerCreate("gt_EndofTime_Func");
TriggerAddEventTimeElapsed(gt_EndofTime, 32767.0, c_timeReal);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:17583
void gt_EndofTime_Init () {
gt_EndofTime = TriggerCreate("gt_EndofTime_Func");
TriggerAddEventTimeElapsed(gt_EndofTime, 32767.0, c_timeReal);
}
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:1027
void libGAwX_gt_InitWarnPlayer_Init () {
libGAwX_gt_InitWarnPlayer = TriggerCreate("libGAwX_gt_InitWarnPlayer_Func");
TriggerAddEventTimeElapsed(libGAwX_gt_InitWarnPlayer, 0.0625, c_timeGame);
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/LibW3AI.galaxy:239
libW3AI_gt_ExtraWorkDelay = TriggerCreate("libW3AI_gt_ExtraWorkDelay_Func");
TriggerEnable(libW3AI_gt_ExtraWorkDelay, false);
TriggerAddEventTimeElapsed(libW3AI_gt_ExtraWorkDelay, 11.0, c_timeGame);
}