User Tools

Site Tools


4rpl:commands:getunitcount

Index

GetUnitCount

GetUnitCount(<-unitType) ->unitCount

Description

Returns a count of the number of units of the specified type. See Unit Types for a list of strings. The count includes both built and unbuilt units.

Take note: This only works for player buildable units such as cannons, towers or airships. It does not work for anything else (eggs, totems, ultraC, emitters, etc.). For other things you'd need to use GetUnitsByType and use GetListCount on it.

Examples

   Print(GetUnitCount("sniper"))

Index

4rpl/commands/getunitcount.txt · Last modified: 2023/06/14 18:56 by durikkan