<- CRPL reference <- Unit Commands

GetUnitType

ArgumentsResultNotation
Unit UID Unit name i1 – s1

Description

Returns the name of the unit type as a string. Names are NOT case sensitive.

Unit Types

Notes:

Flying guppies, strafers, bombers, and runners will return an empty string as their unit type if your version of CW3 is 1.14 or lower.

Examples

:GetUnitTypeCount
	->unitType
	0 ->count
	do (GetUnitsInRange(0 0 9999) 0)
		->unitUID
		if (GetUnitType(<-unitUID) eq(<-unitType))
			<-count add(1) ->count
		endif
	loop
	<-count