<- CRPL reference <- Unit Commands

GetUnitsInRange

ArgumentsResultNotation
Coordinates and rangeNumber of units in range i1 i2 f1 – l1 l2…ln n

Description

Returns the unit UID's of all built player units that are landed and within range. The function pushes the n UID's onto the stack followed by the integer n, where n is the number of units.

Note: This command will also detect Tech Artifacts, Message Artifacts, Power Zones and Shield Keys.

Examples

CurrentCoords 15 GetUnitsInRange
0 do
   ->unit
   <-unit trace
loop