# Start Campaign AI For All Players
Grammar — Start the campaign AI for all computer players
Flags —Native
|Action
The campaign AI must be started for each player that uses AI triggers.
Returns — void
native void CampaignInitAI();
# Related
Category: AI / MiscCampaign / Actions
- Pause AI Time —
void
— AITimePause - Start Campaign AI For All Players —
void
— CampaignInitAI - Start Campaign AI For Player —
void
— AICampaignStart - Global Suicide —
void
— AIGlobalSuicide - Enable/Disable Script Control For Unit —
void
— AISetUnitScriptControlled - Enable/Disable Script Control For Unit Group —
void
— AISetGroupScriptControlled - Enable/Disable Wave Use For Unit —
void
— AISetUnitNotUsableInWaves - Enable/Disable Wave Use For Unit Group —
void
— AISetGroupNotUsableInWaves - Enable/Disable Suicide For Unit —
void
— AISetUnitSuicide - Enable/Disable Suicide For Unit Group —
void
— AISetGroupSuicide - Remove Unit From All Waves —
void
— AIRemoveUnitFromAnyWaves - Remove Unit Group From All Waves —
void
— AIRemoveGroupFromAnyWaves - Remove Unit From All Waves And Set Home —
void
— AIRemoveUnitFromAnyWavesAndSetHome - Remove Unit Group From All Waves And Set Home —
void
— AIRemoveGroupFromAnyWavesAndSetHome - Init Campaign Towns —
void
— AIInitCampaignTowns - Init Campaign Harvesting —
void
— AIInitCampaignHarvest - Issue AI Order —
void
— libNtve_gf_AICast
# Examples
campaigns/liberty.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2map — MapScript.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.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.sc2campaign/base.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.sc2campaign/base.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/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zchar01.sc2map/MapScript.galaxy:4125
}
CampaignInitAI();
AISetAPM(gv_pLAYER_02_ZERG, 10000);
TriggerExecute(gt_ZergAttackWaves, true, false);
campaigns/swarm.sc2campaign — base.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.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map/MapScript.galaxy:4011
}
CampaignInitAI();
TriggerExecute(gt_HybridAI, true, false);
TriggerExecute(gt_ProtossAttackWaves, true, false);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:8528
}
CampaignInitAI();
return true;
}
campaigns/swarm.sc2campaign — base.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.sc2campaign — base.sc2maps/maps/campaign/swarm/zspace01.sc2map/MapScript.galaxy:5002
}
CampaignInitAI();
return true;
}
campaigns/swarm.sc2campaign — base.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.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:3844
}
CampaignInitAI();
return true;
}
campaigns/swarm.sc2campaign — base.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.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue03.sc2map/MapScript.galaxy:1404
}
CampaignInitAI();
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar01.sc2map — MapScript.galaxy:4125
}
CampaignInitAI();
AISetAPM(gv_pLAYER_02_ZERG, 10000);
TriggerExecute(gt_ZergAttackWaves, true, false);
campaigns/swarm.sc2campaign/base.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.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map — MapScript.galaxy:4011
}
CampaignInitAI();
TriggerExecute(gt_HybridAI, true, false);
TriggerExecute(gt_ProtossAttackWaves, true, false);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2map — MapScript.galaxy:8528
}
CampaignInitAI();
return true;
}
campaigns/swarm.sc2campaign/base.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.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace01.sc2map — MapScript.galaxy:5002
}
CampaignInitAI();
return true;
}
campaigns/swarm.sc2campaign/base.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.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2map — MapScript.galaxy:3844
}
CampaignInitAI();
return true;
}
campaigns/swarm.sc2campaign/base.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.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue03.sc2map — MapScript.galaxy:1404
}
CampaignInitAI();
return true;
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/paiur01.sc2map/MapScript.galaxy:2006
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
AIToggleBulliesInRegion(gv_pLAYER_03_ZERG_BOTTOM, RegionPlayableMap(), false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/paiur04.sc2map/MapScript.galaxy:8767
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
AIToggleBulliesInRegion(gv_pLAYER_05_AMONS_FORCES, RegionEntireMap(), false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pkorhal01.sc2map/MapScript.galaxy:3481
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
TriggerExecute(gt_BeginEnemyPatrols, true, true);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pkorhal02.sc2map/MapScript.galaxy:4364
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
AISetAPM(gv_pLAYER_02_DOMINION, 10000);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:3685
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
if ((libLotv_gf_DifficultyValueInt2(0, 0, 1, 1) == 1)) {
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pulnar01.sc2map/MapScript.galaxy:2141
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
TriggerExecute(gt_AttackWaves, true, false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pulnar02.sc2map/MapScript.galaxy:7456
}
CampaignInitAI();
return true;
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur01.sc2map — MapScript.galaxy:2006
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
AIToggleBulliesInRegion(gv_pLAYER_03_ZERG_BOTTOM, RegionPlayableMap(), false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur04.sc2map — MapScript.galaxy:8767
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
AIToggleBulliesInRegion(gv_pLAYER_05_AMONS_FORCES, RegionEntireMap(), false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal01.sc2map — MapScript.galaxy:3481
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
TriggerExecute(gt_BeginEnemyPatrols, true, true);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal02.sc2map — MapScript.galaxy:4364
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
AISetAPM(gv_pLAYER_02_DOMINION, 10000);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:3685
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
if ((libLotv_gf_DifficultyValueInt2(0, 0, 1, 1) == 1)) {
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar01.sc2map — MapScript.galaxy:2141
}
CampaignInitAI();
libVCMI_gf_EnableVoidCampaignAIBehaviorForAllPlayers();
TriggerExecute(gt_AttackWaves, true, false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar02.sc2map — MapScript.galaxy:7456
}
CampaignInitAI();
return true;
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2076
// Deprecated
CampaignInitAI();
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2082
// Automatic Variable Declarations
// Deprecated
CampaignInitAI();
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:2752
// Deprecated
CampaignInitAI();
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:2757
void libNCMI_gf_StartCampaignAIForAllPlayersVoid () {
// Deprecated
CampaignInitAI();
}
mods/novastoryassets.sc2mod — base.sc2maps/maps/campaign/nova/nova01.sc2map/MapScript.galaxy:8804
}
CampaignInitAI();
libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
return true;
mods/novastoryassets.sc2mod — base2.sc2maps/maps/campaign/nova/nova06.sc2map/MapScript.galaxy:3277
}
CampaignInitAI();
libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
TriggerExecute(gt_AttackWaves1, true, false);
mods/novastoryassets.sc2mod — base3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:9012
}
CampaignInitAI();
libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
return true;
mods/novastoryassets.sc2mod — base3.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.sc2map — MapScript.galaxy:8804
}
CampaignInitAI();
libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
return true;
mods/novastoryassets.sc2mod/base2.sc2maps/maps/campaign/nova/nova06.sc2map — MapScript.galaxy:3277
}
CampaignInitAI();
libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
TriggerExecute(gt_AttackWaves1, true, false);
mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2map — MapScript.galaxy:9012
}
CampaignInitAI();
libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
return true;
mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova08.sc2map — MapScript.galaxy:3401
}
CampaignInitAI();
libNCMI_gf_EnableNovaCampaignAIBehaviorForAllPlayers();
if ((libNtve_gf_DifficultyValueInt(1, 1, 0, 0) == 1)) {