User Tools

Site Tools


4rpl:commands:getunittype

This is an old revision of the document!


Index

:!: Available in version 1.3 and later.

GetUnitType

GetUnitType(<-unitUID)

Description

Returns the string type of the unit. For custom units, this is the CMOD GUID. For built in units, it is the string unit type (like “cannon”). In both cases, the string can be passed to CreateUnit and other APIs that take units. The list of Unit Names for built in units is as follows.

Unit Types

  • “tower”
  • “pylon”
  • “miner”
  • “greenarrefinery”
  • “terp”
  • “porter”
  • “cannon”
  • “mortar”
  • “sprayer”
  • “sniper”
  • “missilelauncher”
  • “nullifier”
  • “runway”
  • “bomberpad”
  • “acbomberpad”
  • “rocketpad”
  • “platform”
  • “shield”
  • “microrift”
  • “beacon”
  • “ernportal”
  • “factory”
  • “conversion”
  • “damper”
  • “rain”
  • “singularity”
  • “wall”
  • “collectorpanel3”
  • “collectorpanel5”
  • “inhibitor”
  • “ern”
  • “crystal”
  • “greenarmother”
  • “infocache”
  • “monolith”
  • “pod”
  • “pterosaur”
  • “resourceblue”
  • “resourcered”
  • “totem”
  • “ultrac”
  • “stash”
  • “darktower”
  • “emitter”
  • “sporelauncher”
  • “blobnest”
  • “skimmerfactory”
  • “airsaccauldron”
  • “spore”
  • “blob”
  • “skimmer”
  • “forb”
  • “shrapnel”
  • “airsac”
  • “egg”
  • “airsacbubble”

Examples

trace(GetUnitType(self))

Index

4rpl/commands/getunittype.1611271569.txt.gz · Last modified: 2025/02/14 14:56 (external edit)