# Set Game Speed
Grammar — Set the game speed to speed
Flags —Native
|Action
Sets the current game speed.
# Arguments
int
<preset::GameSpeed> — Speed
Returns — void
native void GameSetSpeedValue(int speed);
# Related
Category: Game / Game Settings
- Map Initialization —
void
— TriggerAddEventMapInit - Save Game Started —
void
— TriggerAddEventSaveGame - Save Game Finished —
void
— TriggerAddEventSaveGameDone - Load Game Finished —
void
— TriggerAddEventLoadGameDone - Set Game Speed —
void
— GameSetSpeedValue - Game Set Quit On Quit Button —
void
— GameSetQuitOnQuitButton - Set Global Time Scale —
void
— GameSetGlobalTimeScale - Pause Mission Time —
void
— GameSetMissionTimePaused - Mission Time Paused —
bool
— GameIsMissionTimePaused - Mission Time —
fixed
— GameGetMissionTime - Set Minimum Game Speed —
void
— GameSetSpeedValueMinimum - Lock Game Speed —
void
— GameSetSpeedLocked - Game Speed Factor —
fixed
— GameGetSpeed - Game Speed —
int
<preset::GameSpeed> — GameGetSpeedValue - Global Time Scale —
fixed
— GameGetGlobalTimeScale - Game Speed Minimum —
int
<preset::GameSpeed> — GameGetSpeedValueMinimum - Game Speed Is Locked —
bool
— GameIsSpeedLocked - Attribute Game Value —
string
<attributevalue> — GameAttributeGameValue - Attribute Player Value —
string
<attributevalue> — GameAttributePlayerValue - Players On Team —
playergroup
— GameAttributePlayersForTeam - Turn Fixed Random Seed On/Off —
void
— GameSetSeedLocked - Random Seed Is Locked —
bool
— GameIsSeedLocked - Set Random Seed —
void
— GameSetSeed - Create Saved Game —
void
— GameSaveCreate - Set Game Pausing Allowed —
void
— GameSetPauseable - Set Tradeshow Game Time Remaining —
void
— GameSetAbsoluteTimeRemaining - Pause Tradeshow Game Time Remaining —
void
— GameSetAbsoluteTimeRemainingPaused - Tradeshow Game Time Remaining —
fixed
— GameGetAbsoluteTimeRemaining - Tradeshow Game Time Remaining Is Paused —
bool
— GameGetAbsoluteTimeRemainingPaused - Map Name —
text
— GameMapName - Map Path —
string
— GameMapPath - Map Description —
text
— GameMapDescription - Map Is Blizzard —
bool
— GameMapIsBlizzard - Map Texture Set —
string
<gamelink::Terrain> — GameTerrainSet - Game Is Test —
bool
— GameIsTestMap - Game Is Examinable —
bool
— GameIsExaminable - Game Get Test Config Type —
int
— GameTestConfigType - Game Is Online —
bool
— GameIsOnline - Game Is Debug Option Set —
bool
— GameIsDebugOptionSet - Game Is Matchmade —
bool
— GameIsMatchmade - Game Is Competitive —
bool
— GameIsCompetitive - Game Is Practice —
bool
— GameIsPractice - Game Is Cooperative —
bool
— GameIsCooperative - Game Allows Duplicate Heroes —
bool
— GameAreHeroDuplicatesAllowed
# Examples
campaigns/liberty.sc2campaign — base.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.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:16742
}
GameSetSpeedValue(c_gameSpeedNormal);
GameSetSpeedLocked(true);
GameTimeOfDaySet("08:00:00");
campaigns/liberty.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.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.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:16742
}
GameSetSpeedValue(c_gameSpeedNormal);
GameSetSpeedLocked(true);
GameTimeOfDaySet("08:00:00");
campaigns/liberty.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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/swarmstoryutil.sc2mod — base.sc2data/Lib281DEC45.galaxy:234
libNtve_gf_StoryMode(PlayerGroupAll(), true);
FogSetDisableAtUltra(true);
GameSetSpeedValue(c_gameSpeedNormal);
GameSetSpeedLocked(true);
GameSetQuitOnQuitButton(false);
campaigns/voidstory.sc2campaign — base.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.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:2142
if ((lp_onOff == true)) {
libNtve_gv__CineModeSavedSpeed = GameGetSpeedValue();
GameSetSpeedValue(c_gameSpeedNormal);
libNtve_gv__CineModeSavedAIPaused = AITimeIsPaused();
AITimePause(true);
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:2155
}
else {
GameSetSpeedValue(libNtve_gv__CineModeSavedSpeed);
if ((libNtve_gv__CineModeSavedAIPaused == false)) {
AITimePause(false);
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:1826
if ((lp_onOff == true)) {
libNtve_gv__CineModeSavedSpeed = GameGetSpeedValue();
GameSetSpeedValue(c_gameSpeedNormal);
libNtve_gv__CineModeSavedAIPaused = AITimeIsPaused();
AITimePause(true);
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:1839
}
else {
GameSetSpeedValue(libNtve_gv__CineModeSavedSpeed);
if ((libNtve_gv__CineModeSavedAIPaused == false)) {
AITimePause(false);
mods/heroes.stormmod — base.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.stormmod — base.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.stormmap — map/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.stormmap — MapScript.galaxy:2002
GameCheatAllow(c_gameCheatVictory, false);
GameCheatAllow(c_gameCheatDefeat, false);
GameSetSpeedValue(c_gameSpeedNormal);
GameSetSpeedLocked(true);
ConversationDataPreloadLines("TutorialVO");
mods/heroesbrawlmods/arenamodemods/arenamode.stormmod — base.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.stormmod — base.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.sc2mod — base.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.sc2mod — base.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.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/starcoop/starcoop.sc2mod — base.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.sc2mod — base.sc2data/LibCOMI.galaxy:12419
}
else {
GameSetSpeedValue(c_gameSpeedFast);
}
}
mods/starcoop/starcoop.sc2mod — base.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.sc2mod — base.sc2data/LibCOUI.galaxy:1778
}
else if (auto076F2A0C_val == 2) {
GameSetSpeedValue(c_gameSpeedFast);
}
else if (auto076F2A0C_val == 3) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:1781
}
else if (auto076F2A0C_val == 3) {
GameSetSpeedValue(c_gameSpeedNormal);
}
else if (auto076F2A0C_val == 4) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:1784
}
else if (auto076F2A0C_val == 4) {
GameSetSpeedValue(c_gameSpeedSlow);
}
else {
mods/warcoop/warclassic.sc2mod — base.sc2data/TriggerLibs/WarClassic.galaxy:967
}
GameSetSpeedValue(c_gameSpeedNormal);
return true;
}