# AIGetMainTown
Flags —
Native
# Arguments
int
— player
Returns — int
native int AIGetMainTown(int player);
# Related
Category: Unclassified
# Examples
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Protoss/ProtossHigh.galaxy:999
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Protoss/ProtossHigh.galaxy:1056
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Terran/TerranHigh.galaxy:1084
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Terran/TerranHigh.galaxy:1136
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Zerg/ZergHigh.galaxy:1021
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Zerg/ZergHigh.galaxy:1069
//bool makeNydusNetwork = false;
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
town = i;
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Protoss/ProtossHigh.galaxy:994
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Protoss/ProtossHigh.galaxy:1051
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Terran/TerranHigh.galaxy:1075
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Terran/TerranHigh.galaxy:1127
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Zerg/ZergHigh.galaxy:1039
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Zerg/ZergHigh.galaxy:1087
//bool makeNydusNetwork = false;
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
town = i;
mods/void.sc2mod — base.sc2data/TriggerLibs/Protoss/ProtossHigh.galaxy:1031
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/void.sc2mod — base.sc2data/TriggerLibs/Protoss/ProtossHigh.galaxy:1088
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
mods/void.sc2mod — base.sc2data/TriggerLibs/Terran/TerranHigh.galaxy:1089
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/void.sc2mod — base.sc2data/TriggerLibs/Terran/TerranHigh.galaxy:1141
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
mods/void.sc2mod — base.sc2data/TriggerLibs/Zerg/ZergHigh.galaxy:1049
int foodUsed = PlayerGetPropertyInt(player, c_playerPropSuppliesUsed);
mainTown = AIGetMainTown(player);
state = AIGetTownState(player, mainTown);
mods/void.sc2mod — base.sc2data/TriggerLibs/Zerg/ZergHigh.galaxy:1097
//bool makeNydusNetwork = false;
mainTown = AIGetMainTown(player);
while (i < c_townMax) {
town = i;
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:81
unitgroup allCreeps=UnitGroup(null, GAw3_AICreepPlayer, RegionEntireMap(), GAw3_AICreepfilter , 0);
unitgroup camp;
point p=AIGetTownLocation(player,AIGetMainTown(player));
unit creep;
unit creepTarget;
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/Orc/Orc.galaxy:82
void GetZeppelin(int player){
AIUpdateMainTown(player);
UnitCreate(1, "nzep", 0, player, AIGetTownLocation(player, AIGetMainTown(player)), 270.0);
//libNtve_gf_CreateUnitsAtPoint2(1, "nzep", 0, player, AIGetTownLocation(player, AIGetMainTown(player)));
AISetUnitScriptControlled(UnitLastCreated(), false);