User Tools

Site Tools


4rpl:commands:getbuildunit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
4rpl:commands:getbuildunit [2021/03/08 20:13] – created virgilw4rpl:commands:getbuildunit [2022/09/10 16:46] – [Description] Type fixed for the 3rd time (better description) Vertu
Line 2: Line 2:
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
-:!: Available in version 1.and later.+:!: Available in version 1.and later.
 ====== GetBuildUnit ====== ====== GetBuildUnit ======
 GetBuildUnit ->selectBuildUnit GetBuildUnit ->selectBuildUnit
  
 ===== Description ===== ===== Description =====
-When building a unit, returns the string for the unit'type. For custom units, the string is the CMOD GUID. For built in units it is the unit name. If no unit is being built, an empty string is returned.+Returns the [[4rpl:commands:unit_types|unit type]] of the unit currently selected in the build menu. For custom units, the string is the CMOD GUID. For built in units it is the built-in [[4rpl:commands:unit_types|unit type]]. If no unit is selected in the build menu, an empty string is returned.
  
 +Example: When the player selects the Cannon from the weapons build tab, "Cannon" will be returned by this API.
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
4rpl/commands/getbuildunit.txt · Last modified: 2023/11/16 16:29 by Kalli