This is an old revision of the document!
~~DISCUSSION~~ <- CRPL reference <- Unit Commands
| Arguments | Result | Notation |
|---|---|---|
| Coordinates, range, square? | Number of units in range | x1 y1 f1 b1 – u1 u2… un n |
Returns the unit UID's of all units (including player/enemy and flying/landed) that are within range. The function pushes the n UID's onto the stack followed by the integer n, where n is the number of units.
If “square?” is set to TRUE, the command uses a square range instead of the usual circular one.
GetAllUnitsInRange(0 0 9999 1) 0 do
->unit
if(GetUnitType(<-unit) "CRPLCORE" eq)
Trace2("Found a CRPL core: " <-unit)
endif
loop