Skip to content

GetUnitTypeCountTotal

Read unit type count total from current game state.

GetUnitTypeCountTotal(unitType)

Inputs: unitType is an integer unit type ID.

Output: count, available: Unit count, including incomplete objects.

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.