Triggers/Functions/Random Spawn Point

From SC2Mapster Wiki
Jump to: navigation, search

AI Function

Random Spawn Point

GUI

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

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

Description

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

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

Additional Information