# Game Is Online

Grammar — Game is online
FlagsNative | Function

Returns true if the game is running online through Battle.net.

Returns — bool

native bool GameIsOnline();

Category: Game / Game Settings

# Examples

campaigns/libertystory.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.stormmodbase.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.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:18019

    }

    if ((GameIsOnline() == true)) {
        StatEventCreate(lv_statType);
        lv_stat = StatEventLastCreated();

mods/heroesdata.stormmodbase.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.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:18171

    }

    if ((GameIsOnline() == true)) {
        StatEventCreate(lv_statType);
        lv_stat = StatEventLastCreated();

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:18247

    }

    if ((GameIsOnline() == true)) {
        StatEventCreate(lv_statType);
        lv_stat = StatEventLastCreated();

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


    libSprt_gv_performanceTestPerformanceTestRunning = GameIsExaminable();
    libCore_gv_dEBUGGameIsOnline = GameIsOnline();
    GameSetSpeedValue(c_gameSpeedNormal);
    GameSetSpeedLocked(true);

mods/heroesdata.stormmodbase.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.sc2modbase.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.sc2modbase.sc2data/LibNovC.galaxy:1366


    // Implementation
    if ((GameIsOnline() == false) && (GameCheatsEnabled(c_gameCheatCategoryDevelopment) == true)) {
        autoAFABD537_ae = 1;
        autoAFABD537_ai = -1;

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


    // Implementation
    if ((GameIsOnline() == true)) {
        autoF9E6B533_val = lp_player;
        if (autoF9E6B533_val == 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1873

    }

    if ((GameIsOnline() == true)) {
        libCOOC_gf_CC_PlayerSetXPScores(lp_result, lp_player);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1896


    // Implementation
    if ((GameIsOnline() == false)) {
        return ;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1975


    // Implementation
    if ((libCOOC_gv_cC_DevStart_Forced == false) && (GameIsOnline() == true)) {
        return ;
    }

mods/starcoop/starcoop.sc2modbase.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.sc2modbase.sc2data/LibCOOC.galaxy:4333


    // Implementation
    libCOOC_gv_cC_DebugPlaytestMode = GameIsOnline();
    TriggerDebugSetTypeFile(1, "StoryModeDebug.txt");
    TriggerDebugSetTypeFile(13, "ACStats.txt");

mods/starcoop/starcoop.sc2modbase.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.sc2modbase.sc2data/LibCOOC.galaxy:4464


    // Implementation
    if ((GameIsOnline() == true)) {
        libCOOC_gf_CC_SaveBNetChoices(lp_player);
        return ;

mods/starcoop/starcoop.sc2modbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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.sc2modbase.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);