# Game Is Online
Grammar — Game is online
Flags —Native
|Function
Returns true if the game is running online through Battle.net.
Returns — bool
native bool GameIsOnline();
# 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/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:10631
DialogControlSetPropertyAsText(DialogControlLastCreated(), c_triggerControlPropertyText, PlayerGroupAll(), StringExternal("Param/Value/lib_Camp_8245BB9F"));
libCamp_gv_tS_DebugProgressButtonReset = DialogControlLastCreated();
if ((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true) && (GameIsOnline() == false) && (libCamp_gf_CampaignDebugModeIsOn("NoBattleNet") == true)) {
DialogControlCreate(DialogLastCreated(), c_triggerControlTypeButton);
libNtve_gf_SetDialogItemHandle(DialogControlLastCreated(), "WoL_DebugProgress_LaunchMissionButton", PlayerGroupAll());
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:4403
libSwaC_gv_zS_AchievementsDisplayed += 1;
AchievementAward(1, lp_achievement);
if (((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == false) || (libSwaC_gv_zS_AchievementDebugEnabled == false) || (GameIsOnline() == true) || (libSwaC_gf_CampaignDebugModeIsOn("NoBattleNet") == false))) {
return true;
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:1591
// Implementation
AchievementAward(1, lp_achievement);
if (((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == false) || (GameIsOnline() == true) || (libVoiC_gv_pC_AchievementDebugToastSuppressed == true) || (libVoiC_gf_CampaignDebugModeIsOn("NoBattleNet") == false))) {
return true;
}
mods/heroesbrawlmods/arenamodemods/arenamode.stormmod — base.stormdata/LibAREN.galaxy:79
libIGHS_gf_SetVictoryCount(libAREN_gv_victoriesCount);
libSprt_gv_performanceTestPerformanceTestRunning = GameIsExaminable();
libCore_gv_dEBUGGameIsOnline = GameIsOnline();
TriggerExecute(libCore_gt_InitializeStormMod, true, true);
SetHeroLeaderPanelEnabled(false);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:18019
}
if ((GameIsOnline() == true)) {
StatEventCreate(lv_statType);
lv_stat = StatEventLastCreated();
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:18138
if ((lv_voiceLine == null)) {
if ((GameIsOnline() == false)) {
libGame_gf_HeroSelectionRandomlyPickVoiceLine(lv_yellingPlayer);
lv_voiceLine = libGame_gv_players[lv_yellingPlayer].lv_lootContent.lv_loot_VoiceLine.lv_voiceLineID;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:18171
}
if ((GameIsOnline() == true)) {
StatEventCreate(lv_statType);
lv_stat = StatEventLastCreated();
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:18247
}
if ((GameIsOnline() == true)) {
StatEventCreate(lv_statType);
lv_stat = StatEventLastCreated();
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/HeroesLib.galaxy:4802
libSprt_gv_performanceTestPerformanceTestRunning = GameIsExaminable();
libCore_gv_dEBUGGameIsOnline = GameIsOnline();
GameSetSpeedValue(c_gameSpeedNormal);
GameSetSpeedLocked(true);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:9655
libUIUI_gv_uIDebugPanel.lv_levelSlider = DialogControlLastCreated();
DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeCheckBox, "SameXPCheckBox");
if ((GameIsOnline() == true)) {
libNtve_gf_SetDialogItemChecked(DialogControlLastCreated(), true, PlayerGroupAll());
}
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:82
// Implementation
AchievementAward(1, lp_achievement);
if (((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == false) || (GameIsOnline() == true) || (libComC_gv_cC_AchievementDebugToastSuppressed == true) || (libComC_gf_CampaignDebugModeIsOn("NoBattleNet") == false))) {
return true;
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNovC.galaxy:1366
// Implementation
if ((GameIsOnline() == false) && (GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true)) {
autoAFABD537_ae = 1;
autoAFABD537_ai = -1;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:9168
// Implementation
if ((GameIsOnline() == true)) {
autoF9E6B533_val = lp_player;
if (autoF9E6B533_val == 1) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1873
}
if ((GameIsOnline() == true)) {
libCOOC_gf_CC_PlayerSetXPScores(lp_result, lp_player);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1896
// Implementation
if ((GameIsOnline() == false)) {
return ;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1975
// Implementation
if ((libCOOC_gv_cC_DevStart_Forced == false) && (GameIsOnline() == true)) {
return ;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:4299
// Automatic Variable Declarations
// Implementation
if ((GameIsOnline() == false) && (GameIsTestMap(false) == true) && (GameCheatsEnabled(c_gameCheatCategoryDevelopment) == false) && (GameMapIsBlizzard() == false)) {
libCOOC_gv_cC_InContestMap = true;
return true;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:4333
// Implementation
libCOOC_gv_cC_DebugPlaytestMode = GameIsOnline();
TriggerDebugSetTypeFile(1, "StoryModeDebug.txt");
TriggerDebugSetTypeFile(13, "ACStats.txt");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:4388
TechTreeUpgradeAddLevel(lv_indexPlayer, "PlayerCommander", 1);
}
if ((libCOOC_gv_cC_DevStart_Forced == false) && ((GameIsOnline() == true) || (libCOOC_gf_GameIsContestLocalTest() == true))) {
libCOOC_gf_CC_LoadDefaultCommanderForContestLocalTest();
libCOOC_gf_CC_ScoreInit();
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:4464
// Implementation
if ((GameIsOnline() == true)) {
libCOOC_gf_CC_SaveBNetChoices(lp_player);
return ;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:4477
// Automatic Variable Declarations
// Implementation
if ((libCOOC_gv_cC_DevStart_Forced == false) && (GameIsOnline() == true)) {
libCOOC_gf_CC_LoadBNetChoices(lp_player);
return ;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:5243
libCOOC_gf_CC_StatEventCreate("PlayerInfo");
libCOOC_gf_CC_StatEventAddInt("PlayerIndex", lv_indexPlayer, libCOOC_gf_CC_StatEventLast());
if ((GameIsOnline() == true)) {
libCOOC_gf_CC_StatEventAddStr("PlayerHandle", PlayerHandle(lv_indexPlayer), libCOOC_gf_CC_StatEventLast());
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:9649
}
if ((GameIsOnline() == true)) {
DataTableSetInt(false, TriggerEventParamName(libCOUI_gv_cUC_ScoreEventClosed, libCOUI_gv_cUC_ScoreParameterPlayer), EventPlayer());
TriggerSendEvent(libCOUI_gv_cUC_ScoreEventClosed);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:3220
libA3DDD02B_gv_pP_AchievementsDisplayed += 1;
AchievementAward(1, lp_achievement);
if (((GameCheatsEnabled(c_gameCheatCategoryDevelopment) == false) || (libA3DDD02B_gv_pP_AchievementDebugEnabled == false) || (libA3DDD02B_gv_pC_AchievementDebugToastSuppressed == true) || (GameIsOnline() == true) || (libA3DDD02B_gf_CampaignDebugModeIsOn("NoBattleNet") == false))) {
return true;
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:241
libWCdr_gv_legends.lv_allyPlayers = PlayerGroupCopy(lp_allyPlayers);
libWCdr_gv_legends.lv_enemyPlayers = PlayerGroupCopy(lp_enemyPlayers);
libWCdr_gv_legends.lv_debugModeIsOn = (GameIsOnline() == false);
libNtve_gf_SetPlayerGroupAlliance(lp_legendPlayers, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetPlayerGroupAlliance(lp_allyPlayers, libNtve_ge_AllianceSetting_Ally);