Due to a sudden burst in spammer activity, account creation has been temporarily disabled. Sorry for the inconvenience to any new potential contributors.

CountUnitDef

From AGEWiki

Jump to: navigation, search

CountUnitDef

Syntax  

CountUnitDef = MAPorREGorAreaUID; UnitDefType; Operator; Value

Description

Count the number of units of a Specific Alias in a Region or Area, compare the count to a value, and set result TRUE if the test is passed.

Note: Counting units in games with Large Combinations (AACW, NCP, RoP, VGN) may not find the
units desired if they are "imbedded" in a Division or Brigade.
In all cases, the command SelectSubUnits is more powerful and more certain.

Example  

CountUnitDef = REG $Boston; $uni_GBR_Inf0; >=; 5

TRUE if 5 or more Units of alias "uni_GBR_Inf0" are present in Region Boston  

CountUnitDef = $New_England; $uni_GBR_Inf0; >=; 5

TRUE if 5 or more Units of alias "uni_GBR_Inf0" are present in Area New_England

 

Parameters

MAPorREGorAreaUID

Define search area. One of:

MAP = entire map
REF = specific Region Alias
Area Alias
UnitDefType

Alias of the target Unit

Operator

One of:

=, <, >, <=, >=, DICE
Value

Integer (0 - 999)

Forums