# Get Closest Town

Grammar — Get the town owned by player player closest to point location
FlagsNative | Function

Returns the index of the town closest to the specified point.

# Arguments

  • int — Player
  • point — Location

Returns — int

native int AIGetClosestTown(int player, point location);

Category: AI Advanced / Towns / Functions

# Examples

— None found —