# Set Game Speed

Grammar — Set the game speed to speed
FlagsNative | Action

Sets the current game speed.

# Arguments

Returns — void

native void GameSetSpeedValue(int speed);

Category: Game / Game Settings

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:4060

    }
    GameCheatAllow(c_gameCheatVictory, false);
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    CinematicFade(false, 0.0, c_fadeStyleNormal, Color(0.00, 0.00, 0.00), 0.0, true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:16742

    }

    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    GameTimeOfDaySet("08:00:00");

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/advancedcommand.sc2map/MapScript.galaxy:1462

    libNtve_gf_GlobalCinematicSetting(false);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
    gv_inCinematic = false;

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/economy.sc2map/MapScript.galaxy:1746

    UnitPauseAll(false);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
    PlayerModifyPropertyInt(gv_pLAYER_USER, c_playerPropMinerals, c_playerPropOperSetTo, 50);

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/protosscombat.sc2map/MapScript.galaxy:2950

    CameraApplyInfo(gv_pLAYER_USER, CameraInfoFromId(49), 1.0, -1, 10, true);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    TriggerExecute(gt_StartAI, true, false);
    TriggerExecute(gt_SpawnRound1, true, false);

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/protosspsionics.sc2map/MapScript.galaxy:1840

    CameraSetBounds(PlayerGroupAll(), RegionPlayableMap(), true);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
    gv_inCinematic = false;

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:2215

    UISetMode(PlayerGroupAll(), c_uiModeConsole, 1.0);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
    gv_watchedIntroCinematicZerg = true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:2501

    UISetMode(PlayerGroupAll(), c_uiModeConsole, 1.0);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
    gv_watchedIntroCinematicProtoss = true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/terrancombat.sc2map/MapScript.galaxy:2814

    CameraApplyInfo(gv_pLAYER_USER, CameraInfoFromId(49), 1.0, -1, 10, true);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    TriggerExecute(gt_StartAI, true, false);
    TriggerExecute(gt_SpawnRound1, true, false);

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/terrancovertops.sc2map/MapScript.galaxy:1458

    libNtve_gf_GlobalCinematicSetting(false);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
    Wait(1.0, c_timeGame);

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/zergcombat.sc2map/MapScript.galaxy:2969

    UISetMode(PlayerGroupAll(), c_uiModeConsole, 1.0);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    TriggerExecute(gt_StartAI, true, false);
    TriggerExecute(gt_SpawnRound1, true, false);

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/zerginfestation.sc2map/MapScript.galaxy:1399

    libNtve_gf_GlobalCinematicSetting(false);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
    gv_inCinematic = false;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:4060

    }
    GameCheatAllow(c_gameCheatVictory, false);
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    CinematicFade(false, 0.0, c_fadeStyleNormal, Color(0.00, 0.00, 0.00), 0.0, true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:16742

    }

    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    GameTimeOfDaySet("08:00:00");

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/advancedcommand.sc2mapMapScript.galaxy:1462

    libNtve_gf_GlobalCinematicSetting(false);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
    gv_inCinematic = false;

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/economy.sc2mapMapScript.galaxy:1746

    UnitPauseAll(false);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
    PlayerModifyPropertyInt(gv_pLAYER_USER, c_playerPropMinerals, c_playerPropOperSetTo, 50);

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/protosscombat.sc2mapMapScript.galaxy:2950

    CameraApplyInfo(gv_pLAYER_USER, CameraInfoFromId(49), 1.0, -1, 10, true);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    TriggerExecute(gt_StartAI, true, false);
    TriggerExecute(gt_SpawnRound1, true, false);

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/protosspsionics.sc2mapMapScript.galaxy:1840

    CameraSetBounds(PlayerGroupAll(), RegionPlayableMap(), true);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
    gv_inCinematic = false;

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/rushdefense.sc2mapMapScript.galaxy:2215

    UISetMode(PlayerGroupAll(), c_uiModeConsole, 1.0);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
    gv_watchedIntroCinematicZerg = true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/rushdefense.sc2mapMapScript.galaxy:2501

    UISetMode(PlayerGroupAll(), c_uiModeConsole, 1.0);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
    gv_watchedIntroCinematicProtoss = true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/terrancombat.sc2mapMapScript.galaxy:2814

    CameraApplyInfo(gv_pLAYER_USER, CameraInfoFromId(49), 1.0, -1, 10, true);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    TriggerExecute(gt_StartAI, true, false);
    TriggerExecute(gt_SpawnRound1, true, false);

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/terrancovertops.sc2mapMapScript.galaxy:1458

    libNtve_gf_GlobalCinematicSetting(false);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
    Wait(1.0, c_timeGame);

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/zergcombat.sc2mapMapScript.galaxy:2969

    UISetMode(PlayerGroupAll(), c_uiModeConsole, 1.0);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    TriggerExecute(gt_StartAI, true, false);
    TriggerExecute(gt_SpawnRound1, true, false);

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/zerginfestation.sc2mapMapScript.galaxy:1399

    libNtve_gf_GlobalCinematicSetting(false);
    GameSetSpeedLocked(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
    gv_inCinematic = false;

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:234

    libNtve_gf_StoryMode(PlayerGroupAll(), true);
    FogSetDisableAtUltra(true);
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    GameSetQuitOnQuitButton(false);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:608

    GameSetTransitionMap(("Campaign/Void/" + libVoiC_gf_PC_CampaignMapFile(lp_storyMap)));
    libNtve_gf_StoryMode(PlayerGroupAll(), true);
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    GameSetQuitOnQuitButton(false);

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:2142

    if ((lp_onOff == true)) {
        libNtve_gv__CineModeSavedSpeed = GameGetSpeedValue();
        GameSetSpeedValue(c_gameSpeedNormal);
        libNtve_gv__CineModeSavedAIPaused = AITimeIsPaused();
        AITimePause(true);

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:2155

    }
    else {
        GameSetSpeedValue(libNtve_gv__CineModeSavedSpeed);
        if ((libNtve_gv__CineModeSavedAIPaused == false)) {
            AITimePause(false);

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:1826

    if ((lp_onOff == true)) {
        libNtve_gv__CineModeSavedSpeed = GameGetSpeedValue();
        GameSetSpeedValue(c_gameSpeedNormal);
        libNtve_gv__CineModeSavedAIPaused = AITimeIsPaused();
        AITimePause(true);

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:1839

    }
    else {
        GameSetSpeedValue(libNtve_gv__CineModeSavedSpeed);
        if ((libNtve_gv__CineModeSavedAIPaused == false)) {
            AITimePause(false);

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/%2810%29trymemode.stormmap/MapScript.galaxy:938

    gv_setGameSpeedUIOn = false;
    lv_speed = gf_GameSpeedFromIndex(FixedToInt(libNtve_gf_DialogItemValue(gv_tryMeModePanel.lv_gameSpeedSlider, gv_pLAYER_TryMe_C)));
    GameSetSpeedValue(lv_speed);
    UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/A2085E1B"));
}

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:2002

    GameCheatAllow(c_gameCheatVictory, false);
    GameCheatAllow(c_gameCheatDefeat, false);
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    ConversationDataPreloadLines("TutorialVO");

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/(10)trymemode.stormmapmap/MapScript.galaxy:938

    gv_setGameSpeedUIOn = false;
    lv_speed = gf_GameSpeedFromIndex(FixedToInt(libNtve_gf_DialogItemValue(gv_tryMeModePanel.lv_gameSpeedSlider, gv_pLAYER_TryMe_C)));
    GameSetSpeedValue(lv_speed);
    UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/A2085E1B"));
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmapMapScript.galaxy:2002

    GameCheatAllow(c_gameCheatVictory, false);
    GameCheatAllow(c_gameCheatDefeat, false);
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    ConversationDataPreloadLines("TutorialVO");

mods/heroesbrawlmods/arenamodemods/arenamode.stormmodbase.stormdata/LibAREN.galaxy:90

    SetTalentTierEnabled(7, false);
    libAREN_gf_ARM_InitializeCrowdCheerEmitters();
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    TimerStart(libGame_gv_gobalTimer, c_timerDurationInfinite, false, c_timeGame);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:4803

    libSprt_gv_performanceTestPerformanceTestRunning = GameIsExaminable();
    libCore_gv_dEBUGGameIsOnline = GameIsOnline();
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    TimerStart(libGame_gv_gobalTimer, c_timerDurationInfinite, false, c_timeGame);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:540

    GameSetTransitionMap(("Campaign/Nova/" + libComC_gf_CC_MapFile(lp_storyMap)));
    libNtve_gf_StoryMode(PlayerGroupAll(), true);
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);
    GameSetQuitOnQuitButton(false);

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova01.sc2map/MapScript.galaxy:9963

    CameraApplyInfo(gv_pLAYER_01_USER, CameraInfoFromId(818), 1.0, -1, 10.0, true);
    libNCMI_gf_CinematicModeCampaign(false, lv_fadeDuration, false);
    GameSetSpeedValue(c_gameSpeedFaster);
    GameSetSpeedLocked(true);
    CameraLockInput(gv_pLAYER_01_USER, true);

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova01.sc2mapMapScript.galaxy:9963

    CameraApplyInfo(gv_pLAYER_01_USER, CameraInfoFromId(818), 1.0, -1, 10.0, true);
    libNCMI_gf_CinematicModeCampaign(false, lv_fadeDuration, false);
    GameSetSpeedValue(c_gameSpeedFaster);
    GameSetSpeedLocked(true);
    CameraLockInput(gv_pLAYER_01_USER, true);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:12416

    if ((libCOMU_gf_CT_MutatorInCustom() == false)) {
        if (((libCOMI_gf_DifficultyLevelForPlayerCoop(1) == 4) || (libCOMI_gf_DifficultyLevelForPlayerCoop(1) == 3)) && ((libCOMI_gf_DifficultyLevelForPlayerCoop(2) == 4) || (libCOMI_gf_DifficultyLevelForPlayerCoop(2) == 3))) {
            GameSetSpeedValue(c_gameSpeedFaster);
        }
        else {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:12419

        }
        else {
            GameSetSpeedValue(c_gameSpeedFast);
        }
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:1775

    auto076F2A0C_val = DialogControlGetSelectedItem(libCOUI_gv_cU_CustomMutatorSpeedDropDown, 1);
    if (auto076F2A0C_val == 1) {
        GameSetSpeedValue(c_gameSpeedFaster);
    }
    else if (auto076F2A0C_val == 2) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:1778

    }
    else if (auto076F2A0C_val == 2) {
        GameSetSpeedValue(c_gameSpeedFast);
    }
    else if (auto076F2A0C_val == 3) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:1781

    }
    else if (auto076F2A0C_val == 3) {
        GameSetSpeedValue(c_gameSpeedNormal);
    }
    else if (auto076F2A0C_val == 4) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:1784

    }
    else if (auto076F2A0C_val == 4) {
        GameSetSpeedValue(c_gameSpeedSlow);
    }
    else {

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

    }

    GameSetSpeedValue(c_gameSpeedNormal);
    return true;
}