# Unit Alias Count For Player
Grammar — unitType alias count for player player, counting countType
Flags —Native
|Function
Returns the number of unit aliases, of a specific unit alias determined by the Unit parameter, owned by the chosen player. The Count Type will determine what state the units must be in to be considered for this function.
# Arguments
int
— Playerstring
— Unitint
[ preset::TechTreeCountType ] — Count Type
Returns — int
native int TechTreeUnitAliasCount(
int player,
string unitType,
int countType,
);
# Related
Category: Tech Tree / Counts
- [F] —
int
— Behavior Count For Player — ( TechTreeBehaviorCount ) - [F] —
int
— Ability Count For Player — ( TechTreeAbilityCount ) - [F] —
int
— Unit Count For Player — ( TechTreeUnitCount ) - [F] —
int
— Unit Alias Count For Player — ( TechTreeUnitAliasCount ) - [F] —
int
— Upgrade Count For Player — ( TechTreeUpgradeCount ) - [F] —
int
— Tech Tree Behavior Count For Unit — ( UnitTechTreeBehaviorCount ) - [F] —
int
— Tech Tree Unit Count For Unit — ( UnitTechTreeUnitCount ) - [F] —
int
— Tech Tree Upgrade Count For Unit — ( UnitTechTreeUpgradeCount )
# Examples
# mods/starcoop/starcoop.sc2mod
// L6087
TechTreeUnitAliasCount(lp_p, "Alias_TychusUniqueUnit", c_techCountIncompleteOnly)
# mods/warcoop/warmeleeai.sc2mod
// L21
TechTreeUnitAliasCount(player,unitid, c_techCountQueuedOrBetter)
// L24
TechTreeUnitAliasCount(player,unitid, c_techCountCompleteOnly)
# mods/warcoop/warmeleeai.sc2mod
// L53
TechTreeUnitAliasCount(player, aliasUnitType, c_techCountQueuedOrBetter)