# Declare Town Specific Slot
Grammar — Set the center of player player’s town town|town to be at point center|center
Flags —Native
|Action
Sets the center of a player’s town to be at the specified point.
# Arguments
int
— Playerint
— Townpoint
— Center
Returns — void
native void AIDeclareTown(
int player,
int town,
point center,
);
# Related
Category: AI Advanced / Towns / Actions
- Declare Next Town —
void
— libNtve_gf_DeclareNextTown - Declare Town Specific Slot —
void
— AIDeclareTown - Set Main Town —
void
— AISetMainTown - Enable Harvesting —
void
— AIHarvest - Set Harvest Rate —
void
— AIHarvestRate - Set Gas Peon Count Override —
void
— AISetGasPeonCountOverride
# Examples
mods/core.sc2mod — base.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.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:245
AIStart(player, true, DifficultyAPM(diff));
AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
AISetMainTown(player, c_townOne);
AIInitCampaignTowns(player);
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1367
// Automatic Variable Declarations
// Implementation
AIDeclareTown(lp_player, AIGetNextUnusedTownSlot(lp_player), lp_center);
}
mods/starcoop/starcoop.sc2mod — base.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.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:288
AIStart(player, true, DifficultyAPM(diff));
AIDeclareTown(player, c_townOne, PlayerStartLocation(player));
AISetMainTown(player, c_townOne);
AIInitCampaignTowns(player);