# Set Day Length

Grammar — Set day length to length game seconds
FlagsNative | Action

Sets the amount of game time it will take to cycle through 24 hours of time of day.

# Arguments

  • fixed — Length

Returns — void

native void GameTimeOfDaySetLength(fixed inSecs);

Category: Environment / Lighting

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:6248

    UnitClearSelection(gv_p1_USER);
    PlayerSetState(gv_p1_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    auto68A85F2C_g = UnitGroup(null, gv_p1_USER, null, UnitFilter(0, 0, 0, 0), 0);
    auto68A85F2C_u = UnitGroupCount(auto68A85F2C_g, c_unitCountAll);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:682

    GameTimeOfDaySet("12:00:00");
    GameTimeOfDayPause(true);
    GameTimeOfDaySetLength((gv_dAY_DURATION + gv_nIGHT_DURATION));
    return true;
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:5826

    UnitClearSelection(gv_pLAYER_01_USER);
    PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    GameSetBackground(c_backgroundFixed, "BelShirSkyBox", 100.0);
    AITimePause(true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor03.sc2map/MapScript.galaxy:731

    GameTimeOfDaySet("18:00:00");
    GameTimeOfDayPause(true);
    GameTimeOfDaySetLength(140.0);
    VisRevealerCreate(gv_pLAYER01_USER, RegionCircle(UnitGetPosition(UnitFromId(258)), 6.0));
    VisRevealerCreate(gv_pLAYER01_USER, RegionFromId(15));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh01.sc2map/MapScript.galaxy:5041

    libNtve_gf_GlobalCinematicSetting(true);
    PlayerSetState(gv_p01_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    TimerPause(gv_lavaTimer, true);
    UnitClearSelection(gv_p01_USER);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:5233

    UnitClearSelection(gv_p1_USER);
    PlayerSetState(gv_p1_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    UnitPauseAll(true);
    AITimePause(true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:5660

    UnitClearSelection(gv_p1_USER);
    PlayerSetState(gv_p1_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    GameSetBackground(c_backgroundFixed, "XilSkybox", 100.0);
    libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(UnitGroupUnit(UnitGroup("XelNagaTemple", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1)), c_animNameDefault, "Stand D End", c_animFlagPlayForever, c_animTimeDefault);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson01.sc2mapMapScript.galaxy:6248

    UnitClearSelection(gv_p1_USER);
    PlayerSetState(gv_p1_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    auto68A85F2C_g = UnitGroup(null, gv_p1_USER, null, UnitFilter(0, 0, 0, 0), 0);
    auto68A85F2C_u = UnitGroupCount(auto68A85F2C_g, c_unitCountAll);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson02.sc2mapMapScript.galaxy:682

    GameTimeOfDaySet("12:00:00");
    GameTimeOfDayPause(true);
    GameTimeOfDaySetLength((gv_dAY_DURATION + gv_nIGHT_DURATION));
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2mapMapScript.galaxy:5826

    UnitClearSelection(gv_pLAYER_01_USER);
    PlayerSetState(gv_pLAYER_01_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    GameSetBackground(c_backgroundFixed, "BelShirSkyBox", 100.0);
    AITimePause(true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/traynor03.sc2mapMapScript.galaxy:731

    GameTimeOfDaySet("18:00:00");
    GameTimeOfDayPause(true);
    GameTimeOfDaySetLength(140.0);
    VisRevealerCreate(gv_pLAYER01_USER, RegionCircle(UnitGetPosition(UnitFromId(258)), 6.0));
    VisRevealerCreate(gv_pLAYER01_USER, RegionFromId(15));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh01.sc2mapMapScript.galaxy:5041

    libNtve_gf_GlobalCinematicSetting(true);
    PlayerSetState(gv_p01_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    TimerPause(gv_lavaTimer, true);
    UnitClearSelection(gv_p01_USER);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:5233

    UnitClearSelection(gv_p1_USER);
    PlayerSetState(gv_p1_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    UnitPauseAll(true);
    AITimePause(true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2mapMapScript.galaxy:5660

    UnitClearSelection(gv_p1_USER);
    PlayerSetState(gv_p1_USER, c_playerStateXPGain, false);
    GameTimeOfDaySetLength(0.0);
    GameSetBackground(c_backgroundFixed, "XilSkybox", 100.0);
    libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(UnitGroupUnit(UnitGroup("XelNagaTemple", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1)), c_animNameDefault, "Stand D End", c_animFlagPlayForever, c_animTimeDefault);

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:987


    GameTimeOfDayPause(false);
    GameTimeOfDaySetLength(480.0);
    return true;
}

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicSystem.galaxy:1061


    GameTimeOfDaySet("00");
    GameTimeOfDaySetLength(libGAwX_gv_dayLenth);
    DialogControlHookupStandard(c_triggerControlTypePortrait, "UIContainer/ConsoleUIContainer/GameTODIndicator");
    libGAwX_gv_c_PortraitTimeOfDayFrame = DialogControlLastCreated();