Triggers/Functions/Random Spawn Point

From SC2Mapster Wiki
Jump to: navigation, search

AI Function[edit | edit source]

Random Spawn Point[edit | edit source]

GUI[edit | edit source]

AI - Random point in region between minDistFromEnemies|Min and maxDistFromEnemies|Max distance from enemy units of player player (prefer points within maxDistFromBuildings|MaxDist of an enemy building)

Galaxy Code[edit | edit source]

point AIRandomSpawnPoint ( int player, region region, fixed minDistFromEnemies, fixed maxDistFromEnemies, fixed maxDistFromBuildings )

Description[edit | edit source]

Returns a random point in the given region. Prefers to stay either close or far from enemies units. Also prefers to be within some max distance of enemy buildings. It will also stay away from previously returned random points in the region.

Parameters[edit | edit source]

  • int player
    • Name: Player
  • region region
    • Name: Region
  • fixed minDistFromEnemies
    • Name: MinDistFromEnemies
  • fixed maxDistFromEnemies
    • Name: MaxDistFromEnemies
  • fixed maxDistFromBuildings
    • Name: MaxDistFromBuildings

Additional Information[edit | edit source]