# Declare Town Specific Slot

Grammar — Set the center of player player’s town town|town to be at point center|center
FlagsNative | Action

Sets the center of a player’s town to be at the specified point.

# Arguments

  • int — Player
  • int — Town
  • point — Center

Returns — void

native void AIDeclareTown(
	int player,
	int town,
	point center,
);

Category: AI Advanced / Towns / Actions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/BaseAI.galaxy:161

    AISetFlag(player, e_flagsClearObs, false);

    AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
    AISetMainTown(player, c_townOne);
    AIHarvest(player, c_townOne);

mods/core.sc2modbase.sc2data/TriggerLibs/BaseAI.galaxy:245

    
    AIStart(player, true, DifficultyAPM(diff));
    AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
    AISetMainTown(player, c_townOne);
    AIInitCampaignTowns(player);

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:1367

    // Automatic Variable Declarations
    // Implementation
    AIDeclareTown(lp_player, AIGetNextUnusedTownSlot(lp_player), lp_center);
}

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/BaseAI.galaxy:196

    AISetFlag(player, e_flagsClearObs, false);

    AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
    AISetMainTown(player, c_townOne);
    AIHarvest(player, c_townOne);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/BaseAI.galaxy:288

    
    AIStart(player, true, DifficultyAPM(diff));
	AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
    AISetMainTown(player, c_townOne);
    AIInitCampaignTowns(player);