User Tools

Site Tools


crpl:docs:getenemyunitsinrange

This is an old revision of the document!


~~DISCUSSION~~ <- 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
crpl/docs/getenemyunitsinrange.1590884426.txt.gz · Last modified: 2020/05/30 20:20 by Sanian