# Current Time Of Day
Grammar — Current game time of day
Flags —Native
|Function
Returns the current game time of day.
Returns — string
<timeofday>
native string GameTimeOfDayGet();
# Related
Category: Environment / Lighting
- Game Day/Night State Change —
void
— TriggerAddEventGameTimeEvent - Set Lighting —
void
— GameSetLighting - Set Lighting For Player —
void
— PlayerSetLighting - Set Time Of Day —
void
— GameTimeOfDaySet - Set Time Of Day (Seconds) —
void
— GameTimeOfDayValueSet - Set Time Of Day (Hours, Minutes, Seconds) —
void
— GameTimeOfDayTimeValueSet - Set Time of Day Lighting —
void
— GameSetToDLighting - Set Time of Day Lighting For Player —
void
— PlayerSetToDLighting - Set Day Length —
void
— GameTimeOfDaySetLength - Pause/Unpause Time Of Day —
void
— GameTimeOfDayPause - Triggering Day/Night State —
int
<preset::DayNightEventType> — EventGameTimeEvent - Current Time Of Day —
string
<timeofday> — GameTimeOfDayGet - Current Time Of Day (Seconds) —
int
— GameTimeOfDayValueGet - Current Day/Night State —
int
<preset::DayNightEventType> — GameTimeOfDayCurrentTimeEvent - Day Length —
fixed
— GameTimeOfDayGetLength - Time Of Day Is Paused —
bool
— GameTimeOfDayIsPaused
# Examples
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/WarClassicSystem.galaxy:1462
if ((libGAwX_gv_timeOfDayOverrideCritSection == 0)) {
libGAwX_gv_timeOfDayOverrideOldTOD = GameTimeOfDayGet();
GameTimeOfDaySet(libGAwX_gv_timeOfDayOverrideNewTOD);
GameTimeOfDayPause(true);