User Tools

Site Tools


4rpl:commands:getunitcanbuild

Index

GetUnitCanBuild

GetUnitCanBuild(<-unitType) ->canBuild

Description

Returns a boolean indicating if the specified unit can be built. This call controls the visibility of the build buttons in the left build pane. Unit type is a subset of Unit Types and must be represented on the build pane.

The unitType can be one of:

  • riftlab
  • factory
  • ernportal
  • tower
  • pylon
  • miner
  • greenarrefinery
  • terp
  • porter
  • cannon
  • mortar
  • sprayer
  • sniper
  • missilelauncher
  • nullifier
  • runway
  • bomberpad
  • acbomberpad
  • rocketpad
  • platform
  • shield
  • microrift
  • beacon

Avoid using this call frequently. It is very CPU intensive and should only be declared at the most minimalistic applications. Never use this more than you need to for as infrequent as possible.

Examples

   if (GetUnitCanBuild("beacon"))
      Print("The Player can build beacons")
   endif

Index

4rpl/commands/getunitcanbuild.txt · Last modified: 2022/01/21 19:27 by Vertu