This is an old revision of the document!
~~DISCUSSION~~
<- CRPL reference <- Unit Commands
GetUnitType
| Arguments | Result | Notation |
| Unit UID | Unit name | i1 – s1 |
Description
Returns the name of the unit type. Names are NOT case sensitive.
COMMANDNODE
CRPLCORE
COLLECTOR
RELAY
REACTOR
OREMINE
SIPHON
TERP
GUPPY
PULSECANNON
MORTAR
STRAFER
BOMBER
SPRAYER
NULLIFIER
SHIELD
BEAM
SNIPER
FORGE
BERTHA
POWERZONE
OREDEPOSIT
ENERGYDEPOSIT0
ENERGYDEPOSIT1
ENERGYDEPOSIT2
ENERGYDEPOSIT3
SHIELDKEY
TECHARTIFACT
MESSAGEARTIFACT
THOR
CRPLCORE
RESOURCEPACK
TOTEM
EMITTER
SPORETOWER
RUNNERNEST
AETOWER
INHIBITOR
Examples
:GetUnitTypeCount
->unitType
0 ->count
do (GetUnitsInRange(0 0 9999) 0)
->unitUID
if (GetUnitType(<-unitUID) eq(<-unitType))
<-count add(1) ->count
endif
loop
<-count