<- CRPL reference <- Unit Commands

GetEnemyUnitsInRange

ArgumentsResultNotation
Coordinates and rangeNumber of enemy units in range and their UID'si1 i2 f1 – l1 l2…ln n

Description

Pushes the UID's of all enemy units in range (emitters, spore towers, cores) onto the stack followed by the integer n, where n is the number of units.

Examples

:GetEmitterCount
0 ->count
do (GetEnemyUnitsInRange(0 0 9999) 0)
	->unitUID
	if (GetUnitType(<-unitUID) "EMITTER" eq)
		<-count add(1) ->count
	endif
loop
<-count