# Init Campaign Towns
Grammar — Initialize campaign towns for player player
Flags —Native|Action
Initializes the towns for an AI player. This happens automatically when you call one of the Start Campaign AI actions.
# Arguments
int— Player
Returns — void
native void AIInitCampaignTowns(int player);
# 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
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:247
AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
AISetMainTown(player, c_townOne);
AIInitCampaignTowns(player);
AIInitCampaignHarvest(player);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:290
AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
AISetMainTown(player, c_townOne);
AIInitCampaignTowns(player);
AIInitCampaignHarvest(player);