User Tools

Site Tools


crpl:docs:getunittype

This is an old revision of the document!


~~DISCUSSION~~ <- CRPL reference <- Unit Commands

GetUnitType

ArgumentsResultNotation
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 [see note]
  • PULSECANNON
  • MORTAR
  • STRAFER [see note]
  • BOMBER [see note]
  • SPRAYER
  • NULLIFIER
  • SHIELD
  • BEAM
  • SNIPER
  • FORGE
  • BERTHA
  • POWERZONE
  • OREDEPOSIT
  • ENERGYDEPOSIT0 FIXME
  • ENERGYDEPOSIT1 FIXME
  • ENERGYDEPOSIT2 FIXME
  • ENERGYDEPOSIT3 FIXME
  • SHIELDKEY
  • TECHARTIFACT
  • MESSAGEARTIFACT
  • THOR
  • CRPLCORE
  • RESOURCEPACK
  • TOTEM
  • EMITTER
  • SPORETOWER
  • RUNNERNEST [see note]
  • AETOWER
  • INHIBITOR

Note: flying guppies, strafers, bombers, and runners currently return an empty string as their unit type. This may be a bug, so probably shouldn't be relied upon.

Examples

:GetUnitTypeCount
	->unitType
	0 ->count
	do (GetUnitsInRange(0 0 9999) 0)
		->unitUID
		if (GetUnitType(<-unitUID) eq(<-unitType))
			<-count add(1) ->count
		endif
	loop
	<-count
crpl/docs/getunittype.1382997819.txt.gz · Last modified: 2014/10/01 15:02 (external edit)