# Behavior Count For Player

GrammarbehaviorType count for player player, counting countType
FlagsNative | Function

Returns the count for the specified behavior that the specified player’s units have.

# Arguments

  • int — Player
  • string [ gamelink::Behavior ] — Behavior
  • int [ preset::TechTreeCountType ] — Count Type

Returns — int

native int TechTreeBehaviorCount(
	int player,
	string behaviorType,
	int countType,
);

Category: Tech Tree / Counts

# Examples

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L4002
TechTreeBehaviorCount(gv_pLAYER_01_USER, "InfestorDetectorRadarDetected", c_techCountQueuedOrBetter)
// L4002
TechTreeBehaviorCount(gv_pLAYER_01_USER, "InfestorDetectorRadarDetected", c_techCountQueuedOrBetter)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L17294
TechTreeBehaviorCount(1, "ZerglingRespawnPrimary", c_techCountCompleteOnly)

# mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod

LibMDoE.galaxy

// L911
TechTreeBehaviorCount(lv_itPlayer, "MapMechanicStack", c_techCountCompleteOnly)
// L2843
TechTreeBehaviorCount(lv_handInPlayer, "MapMechanicStack", c_techCountCompleteOnly)
// L3091
TechTreeBehaviorCount(lv_player, "MapMechanicStack", c_techCountCompleteOnly)

# mods/heroesdata.stormmod

UILib.galaxy

// L6948
TechTreeBehaviorCount(lp_player, "MalthaelNoOneCanStopDeathActivated", c_techCountQueuedOrBetter)

# mods/heroesmapmods/battlegroundmapmods/blackheartsbay.stormmod

LibBBAY.galaxy

// L1443
TechTreeBehaviorCount(lv_itPlayer, "MapMechanicStack", c_techCountCompleteOnly)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L6065
TechTreeBehaviorCount(lp_p, "TychusTier3Behavior", c_techCountCompleteOnly)
// L6069
TechTreeBehaviorCount(lp_p, "TychusTier2Behavior", c_techCountCompleteOnly)
// L6073
TechTreeBehaviorCount(lp_p, "TychusTier1Behavior", c_techCountCompleteOnly)
// L6088
TechTreeBehaviorCount(lp_p, "TychusHeroCount", c_techCountCompleteOnly)
// L29986
TechTreeBehaviorCount(lv_indexPlayer, "ZerglingRespawnPrimary", c_techCountCompleteOnly)