Skip to content

GetUnitTypeCount

Read unit type count from current game state.

GetUnitTypeCount(unitType)

Inputs: unitType is an integer unit type ID.

Output: count, available: Completed assigned-player unit count.

Errors and unavailable states: Wrong argument types can raise a Lua argument error. If available is false, ignore the first return value; it is not a confirmed result.

See Game data and world for related calls and usage notes.