~~NOTOC~~ <=[[4rpl:start| Index]] * [[4rpl:commands:GetUnitCanBuild|Get]] * [[4rpl:commands:SetUnitCanBuild|Set]] ====== 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 <=[[4rpl:start| Index]]