# Get Defense Gather Location
Grammar — Get the default defensive gather location for town town of player player
Flags —Native|Function
Returns the default defensive gather location for a town of a player.
# Arguments
int— Playerint— Town
Returns — point
native point AIGetGatherDefLocation(int player, int town);
# Related
Category: AI Advanced / Towns / Functions
- Get Town State —
int— AIGetTownState - Get Town Location —
point— AIGetTownLocation - Get Closest Town —
int— AIGetClosestTown - Get Next Unused Town Slot —
int— AIGetNextUnusedTownSlot - Get Building Count In Town —
int— AIGetBuildingCountInTown - Is Town Harvesting —
bool— AIIsTownHarvestRunning - Get Current Harvest Peon Count —
int— AIGetCurPeonCount - Get Min Desired Harvest Peon Count —
int— AIGetMinPeonCount - Get Max Desired Harvest Peon Count —
int— AIGetMaxPeonCount - Get Mineral Amount Left —
int— AIGetMineralAmountLeft - Get Gas Amount Left —
int— AIGetGasAmountLeft - Get Num Mineral Spots —
int— AIGetMineralNumSpots - Get Num RawGas Spots —
int— AIGetRawGasNumSpots - Get Offense Gather Location —
point— AIGetGatherLocation - Get Defense Gather Location —
point— AIGetGatherDefLocation - Expand —
int— AIExpand - Get Town Threats —
unitgroup— AIGetTownThreats
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:3205
}
else {
lv_createPosition = AIGetGatherDefLocation(lp_player, -1);
}
UnitCreate(1, lv_unitToCreate, 0, lp_player, lv_createPosition, libNtve_gf_RandomAngle());