# Campaign Mode

Grammar — Turn campaign mode onOff for players
FlagsNative | Action | Restricted

Turns campaign mode on or off for a player group. This will only work for Blizzard maps.

# Arguments

  • playergroup — Players
  • bool<preset::OnOffOption> — On/Off

Returns — void

native void CampaignMode(
	playergroup players,
	bool campaignMode,
);

Category: Story / Modes And Sets

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:8193


    // Implementation
    CampaignMode(PlayerGroupAll(), true);
    libNtve_gf_AddRemoveUIFrameTypeForGlobalFilterList(true, c_syncFrameTypeTextTag);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeTeamResourceButton, false);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:12673


    // Implementation
    CampaignMode(PlayerGroupAll(), true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeTeamResourceButton, false);
    libNtve_gf_AddRemoveUIFrameTypeForGlobalFilterList(true, c_syncFrameTypeTextTag);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:6510


    // Implementation
    CampaignMode(PlayerGroupAll(), true);
    libNtve_gf_AddRemoveUIFrameTypeForGlobalFilterList(true, c_syncFrameTypeTextTag);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeTeamResourceButton, false);

mods/missionpacks/campaigncommon.sc2modbase.sc2data/LibComC.galaxy:349

    // Implementation
    TriggerDebugSetTypeFile(1, "StoryModeDebug.txt");
    CampaignMode(PlayerGroupAll(), true);
    libNtve_gf_AddRemoveUIFrameTypeForGlobalFilterList(true, c_syncFrameTypeTextTag);
    libComC_gv_cC_CurrentMap = lp_storyMap;

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:5829


    // Implementation
    CampaignMode(PlayerGroupAll(), true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeTeamResourceButton, false);
    libNtve_gf_AddRemoveUIFrameTypeForGlobalFilterList(true, c_syncFrameTypeTextTag);