Index

GetNearestAirSac

GetNearestAirSac(<-worldPosition <-range <-factorAssignedMissiles) ->spore

Description

Finds the nearest AirSac to the worldPosition, a Vector3, within the spherical range, a float. The factorAssignedMissiles is a boolean that looks at the number of assigned missiles to the Air Sac. If true, and there are enough missiles already in route to the Air Sac to destroy it, the Air Sac will be ignored. The return value is the Air Sac UID, or -1 if no Air Sac is found in range. Note that the range does not affect the performance of this call. All Air Sacs are iterated over regardless of the range.

Examples

GetNearestAirSac(GetUnitPosition(self) 20 true) ->airSac

Index