# Start Campaign AI For All Players

Grammar — Start the campaign AI for all computer players
FlagsNative | Action

The campaign AI must be started for each player that uses AI triggers.

Returns — void

native void CampaignInitAI();

Category: AI / MiscCampaign / Actions

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:1814

    }

    CampaignInitAI();
    AIAttackWaveSetTargetUnitGroup(gv_p2_ZERG_ORANGE_NW, gv_colonistsOnTheMove);
    AIAttackWaveSetTargetUnitGroup(gv_p3_ZERG_LIGHTBLUE_SE, gv_colonistsOnTheMove);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:1895

    }

    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_p04_DOMINION_INFANTRY_A, PlayerGroupSingle(gv_p02_TYCHUS));
    AIAttackWaveSetTargetPlayer(gv_p08_DOMINION_INFANTRY_B, PlayerGroupSingle(gv_p02_TYCHUS));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus05.sc2map/MapScript.galaxy:3564

    }

    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_pLAYER_02_ScriptedTOSS, PlayerGroupSingle(gv_pLAYER_01_USER));
    AIAttackWaveSetTargetPlayer(gv_pLAYER_03_HighTOSS, PlayerGroupSingle(gv_pLAYER_01_USER));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul04.sc2map/MapScript.galaxy:1658

    TriggerExecute(gt_PlayerHasNoGroundUnitsAndStructures, true, false);
    TriggerExecute(gt_PlayerHasNoStructures, true, false);
    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_p04_ZERG_NW, PlayerGroupSingle(gv_p01_PLAYER));
    AIAttackWaveSetTargetPlayer(gv_p05_ZERG_NE, PlayerGroupSingle(gv_p01_PLAYER));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson01.sc2mapMapScript.galaxy:1814

    }

    CampaignInitAI();
    AIAttackWaveSetTargetUnitGroup(gv_p2_ZERG_ORANGE_NW, gv_colonistsOnTheMove);
    AIAttackWaveSetTargetUnitGroup(gv_p3_ZERG_LIGHTBLUE_SE, gv_colonistsOnTheMove);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner03.sc2mapMapScript.galaxy:1895

    }

    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_p04_DOMINION_INFANTRY_A, PlayerGroupSingle(gv_p02_TYCHUS));
    AIAttackWaveSetTargetPlayer(gv_p08_DOMINION_INFANTRY_B, PlayerGroupSingle(gv_p02_TYCHUS));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus05.sc2mapMapScript.galaxy:3564

    }

    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_pLAYER_02_ScriptedTOSS, PlayerGroupSingle(gv_pLAYER_01_USER));
    AIAttackWaveSetTargetPlayer(gv_pLAYER_03_HighTOSS, PlayerGroupSingle(gv_pLAYER_01_USER));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul04.sc2mapMapScript.galaxy:1658

    TriggerExecute(gt_PlayerHasNoGroundUnitsAndStructures, true, false);
    TriggerExecute(gt_PlayerHasNoStructures, true, false);
    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_p04_ZERG_NW, PlayerGroupSingle(gv_p01_PLAYER));
    AIAttackWaveSetTargetPlayer(gv_p05_ZERG_NE, PlayerGroupSingle(gv_p01_PLAYER));

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zchar01.sc2map/MapScript.galaxy:4125

    }

    CampaignInitAI();
    AISetAPM(gv_pLAYER_02_ZERG, 10000);
    TriggerExecute(gt_ZergAttackWaves, true, false);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zexpedition03.sc2map/MapScript.galaxy:7031

    }

    CampaignInitAI();
    AISetDifficulty(gv_pLAYER_02_ZERG, c_diffNormalVision, true);
    AIToggleBulliesInRegion(gv_pLAYER_02_ZERG, RegionEntireMap(), false);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zhybrid03.sc2map/MapScript.galaxy:4011

    }

    CampaignInitAI();
    TriggerExecute(gt_HybridAI, true, false);
    TriggerExecute(gt_ProtossAttackWaves, true, false);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:8528

    }

    CampaignInitAI();
    return true;
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab02.sc2map/MapScript.galaxy:9908

    }

    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_pLAYER_02_DOMINION, PlayerGroupSingle(gv_pLAYER_01_USER));
    AIAttackWaveSetTargetPlayer(gv_pLAYER_02_DOMINION22, PlayerGroupSingle(gv_pLAYER_01_USER));

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zspace01.sc2map/MapScript.galaxy:5002

    }

    CampaignInitAI();
    return true;
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zspace02.sc2map/MapScript.galaxy:7834

    RegionPlayableMapSet(RegionFromId(11));
    VisExploreArea(gv_p01_USER, RegionEntireMap(), false, false);
    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_p02_DOMINION, PlayerGroupSingle(gv_p01_USER));
    AIAttackWaveSetTargetPlayer(gv_p03_DOMINION, PlayerGroupSingle(gv_p01_USER));

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:3844

    }

    CampaignInitAI();
    return true;
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zzerus03.sc2map/MapScript.galaxy:10408

    CameraSetData(PlayerGroupAll(), "ZoomedCamera");
    VisExploreArea(gv_pLAYER_01_USER, RegionEntireMap(), false, false);
    CampaignInitAI();
    RegionPlayableMapSet(RegionFromId(1));
    SoundStop(gv_introSound1, true);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/voidprologue/voidprologue03.sc2map/MapScript.galaxy:1404

    }

    CampaignInitAI();
    return true;
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar01.sc2mapMapScript.galaxy:4125

    }

    CampaignInitAI();
    AISetAPM(gv_pLAYER_02_ZERG, 10000);
    TriggerExecute(gt_ZergAttackWaves, true, false);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zexpedition03.sc2mapMapScript.galaxy:7031

    }

    CampaignInitAI();
    AISetDifficulty(gv_pLAYER_02_ZERG, c_diffNormalVision, true);
    AIToggleBulliesInRegion(gv_pLAYER_02_ZERG, RegionEntireMap(), false);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid03.sc2mapMapScript.galaxy:4011

    }

    CampaignInitAI();
    TriggerExecute(gt_HybridAI, true, false);
    TriggerExecute(gt_ProtossAttackWaves, true, false);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2mapMapScript.galaxy:8528

    }

    CampaignInitAI();
    return true;
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab02.sc2mapMapScript.galaxy:9908

    }

    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_pLAYER_02_DOMINION, PlayerGroupSingle(gv_pLAYER_01_USER));
    AIAttackWaveSetTargetPlayer(gv_pLAYER_02_DOMINION22, PlayerGroupSingle(gv_pLAYER_01_USER));

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace01.sc2mapMapScript.galaxy:5002

    }

    CampaignInitAI();
    return true;
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace02.sc2mapMapScript.galaxy:7834

    RegionPlayableMapSet(RegionFromId(11));
    VisExploreArea(gv_p01_USER, RegionEntireMap(), false, false);
    CampaignInitAI();
    AIAttackWaveSetTargetPlayer(gv_p02_DOMINION, PlayerGroupSingle(gv_p01_USER));
    AIAttackWaveSetTargetPlayer(gv_p03_DOMINION, PlayerGroupSingle(gv_p01_USER));

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2mapMapScript.galaxy:3844

    }

    CampaignInitAI();
    return true;
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus03.sc2mapMapScript.galaxy:10408

    CameraSetData(PlayerGroupAll(), "ZoomedCamera");
    VisExploreArea(gv_pLAYER_01_USER, RegionEntireMap(), false, false);
    CampaignInitAI();
    RegionPlayableMapSet(RegionFromId(1));
    SoundStop(gv_introSound1, true);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue03.sc2mapMapScript.galaxy:1404

    }

    CampaignInitAI();
    return true;
}

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur01.sc2map/MapScript.galaxy:2006

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    AIToggleBulliesInRegion(gv_pLAYER_03_ZERG_BOTTOM, RegionPlayableMap(), false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur04.sc2map/MapScript.galaxy:8767

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    AIToggleBulliesInRegion(gv_pLAYER_05_AMONS_FORCES, RegionEntireMap(), false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pkorhal01.sc2map/MapScript.galaxy:3481

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    TriggerExecute(gt_BeginEnemyPatrols, true, true);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pkorhal02.sc2map/MapScript.galaxy:4364

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    AISetAPM(gv_pLAYER_02_DOMINION, 10000);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:3685

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    if ((libLotv_gf_DifficultyValueInt2(0, 0, 1, 1) == 1)) {

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pulnar01.sc2map/MapScript.galaxy:2141

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    TriggerExecute(gt_AttackWaves, true, false);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pulnar02.sc2map/MapScript.galaxy:7456

    }

    CampaignInitAI();
    return true;
}

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur01.sc2mapMapScript.galaxy:2006

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    AIToggleBulliesInRegion(gv_pLAYER_03_ZERG_BOTTOM, RegionPlayableMap(), false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur04.sc2mapMapScript.galaxy:8767

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    AIToggleBulliesInRegion(gv_pLAYER_05_AMONS_FORCES, RegionEntireMap(), false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal01.sc2mapMapScript.galaxy:3481

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    TriggerExecute(gt_BeginEnemyPatrols, true, true);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal02.sc2mapMapScript.galaxy:4364

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    AISetAPM(gv_pLAYER_02_DOMINION, 10000);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2mapMapScript.galaxy:3685

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    if ((libLotv_gf_DifficultyValueInt2(0, 0, 1, 1) == 1)) {

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar01.sc2mapMapScript.galaxy:2141

    }

    CampaignInitAI();
    libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
    TriggerExecute(gt_AttackWaves, true, false);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar02.sc2mapMapScript.galaxy:7456

    }

    CampaignInitAI();
    return true;
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2076


    // Deprecated
    CampaignInitAI();
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2082

    // Automatic Variable Declarations
    // Deprecated
    CampaignInitAI();
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:2752


    // Deprecated
    CampaignInitAI();
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:2757

void libNCMI_gf_StartCampaignAIForAllPlayersVoid () {
    // Deprecated
    CampaignInitAI();
}

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

    }

    CampaignInitAI();
    libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
    return true;

mods/novastoryassets.sc2modbase2.sc2maps/maps/campaign/nova/nova06.sc2map/MapScript.galaxy:3277

    }

    CampaignInitAI();
    libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
    TriggerExecute(gt_AttackWaves1, true, false);

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:9012

    }

    CampaignInitAI();
    libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
    return true;

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova08.sc2map/MapScript.galaxy:3401

    }

    CampaignInitAI();
    libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
    if ((libNtve_gf_DifficultyValueInt(1, 1, 0, 0) == 1)) {

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

    }

    CampaignInitAI();
    libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
    return true;

mods/novastoryassets.sc2mod/base2.sc2maps/maps/campaign/nova/nova06.sc2mapMapScript.galaxy:3277

    }

    CampaignInitAI();
    libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
    TriggerExecute(gt_AttackWaves1, true, false);

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2mapMapScript.galaxy:9012

    }

    CampaignInitAI();
    libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
    return true;

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova08.sc2mapMapScript.galaxy:3401

    }

    CampaignInitAI();
    libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
    if ((libNtve_gf_DifficultyValueInt(1, 1, 0, 0) == 1)) {