# Stack Count Of Behavior On Unit
Grammar — Stack count of behavior on unit
Flags —Native
|Function
Returns the stack count of a behavior on a unit.
# Arguments
unit
— Unitstring
[ gamelink::Behavior ] — Behavior
Returns — int
native int UnitBehaviorCount(
unit inUnit,
string inBehavior,
);
# Related
Category: Behavior / Basic
- [F] —
void
— Remove Behaviors By Category — ( UnitBehaviorRemoveCategory ) - [F] —
void
— Remove Behavior (Player) — ( UnitBehaviorRemovePlayer ) - [F] —
void
— Remove Behavior — ( UnitBehaviorRemove ) - [F] —
void
— Add Behavior (Player) — ( UnitBehaviorAddPlayer ) - [F] —
void
— Add Behavior — ( UnitBehaviorAdd ) - [F] —
void
— Set Behavior Count — ( libNtve_gf_SetBehaviorCount ) - [F] —
int
— Number Of Behaviors On Unit — ( UnitBehaviorCountAll ) - [F] —
string
[ gamelink::Behavior ] — Unit Behavior — ( UnitBehaviorGet ) - [F] —
bool
— Unit Has Behavior — ( UnitHasBehavior2 ) - [F] —
bool
— Unit Has Behavior (Enabled) — ( UnitHasBehavior ) - [F] —
bool
— Unit Behavior Enabled — ( UnitBehaviorEnabled ) - [F] —
int
— Stack Count Of Behavior On Unit — ( UnitBehaviorCount ) - [F] —
bool
— Behavior Has Flag — ( UnitBehaviorHasFlag ) - [F] —
void
— Transfer Behavior — ( UnitBehaviorTransfer ) - [F] —
void
— Set Unit Behavior Duration — ( UnitBehaviorSetDuration ) - [F] —
void
— Set Unit Behavior Duration Remaining — ( UnitBehaviorSetDurationRemaining ) - [F] —
fixed
— Duration Remaining Of Behavior On Unit — ( UnitBehaviorDuration ) - [F] —
fixed
— Duration Of Behavior On Unit — ( UnitBehaviorDurationTotal ) - [F] —
void
— Set Unit Behavior Spawn Count — ( UnitBehaviorSpawn ) - [F] —
int
— Unit Behavior Effect Player — ( UnitBehaviorEffectPlayer ) - [F] —
unit
— Unit Behavior Effect Unit — ( UnitBehaviorEffectUnit ) - [F] —
void
— Set Unit Behavior User Data — ( UnitBehaviorEffectTreeSetUserData ) - [F] —
fixed
— User Data Of Behavior On Unit — ( UnitBehaviorEffectTreeUserData ) - [F] —
bool
— User Data Of Behavior On Unit Exists — ( UnitBehaviorEffectTreeUserDataExists ) - [F] —
void
— Unit Behavior Changes — ( TriggerAddEventUnitBehaviorChange ) - [F] —
void
— Unit Behavior Changes From Category — ( TriggerAddEventUnitBehaviorChangeFromCategory ) - [F] —
string
[ gamelink::Behavior ] — Triggering Behavior — ( EventUnitBehavior ) - [F] —
int
[ preset::BehaviorChange ] — Triggering Behavior Change — ( EventUnitBehaviorChange ) - [F] —
fixed
— Unit Behavior Damage Modify Remaining — ( UnitBehaviorDamageModifyRemaining ) - [F] —
fixed
— Unit Behavior Damage Modify Limit — ( UnitBehaviorDamageModifyLimit ) - [F] —
void
— For Each Behavior On Unit — ( )
# Examples
# mods/core.sc2mod
// L1678
UnitBehaviorCount(lp_inUnit, lp_inBehavior)
# mods/core.sc2mod
// L246
UnitBehaviorCount(aiUnit, c_BF_GuardianShield)
// L496
UnitBehaviorCount(unitToCheck, c_BF_CorePhotonOvercharge)
// L1324
UnitBehaviorCount(unitToCheck, c_BF_OracleRevelation)
# mods/heroes.stormmod
// L5864
UnitBehaviorCount(libGame_gv_players[libStEx_gv_pLAYER_01_USER].lv_heroUnit, "Mounted")
// L5864
UnitBehaviorCount(libGame_gv_players[libStEx_gv_pLAYER_01_USER].lv_heroUnit, "Mounted")
# mods/heroesbrawlmods/arenamodemods/templearena.stormmod
// L327
UnitBehaviorCount(libAMCT_gv_aRMSkyTemple[lp_templeIndex].lv_beacon, "DisableBeaconBuff")
# mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod
// L951
UnitBehaviorCount(lp_heroUnit, "MapMechanicStack")
// L1002
UnitBehaviorCount(lv_unitGroupUnit, "MapMechanicStack")
# mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod
// L402
UnitBehaviorCount(libGame_gv_players[lv_itPlayerIterator].lv_heroUnit, libPVEB_gv_pvEPickupPickupsCarryBehavior[lv_itBehaviorIterator])
# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod
// L659
UnitBehaviorCount(libGame_gv_players[lv_itPlayerIterator].lv_heroUnit, libPVEM_gv_pvEPickupsCarryBehavior[lv_itBehaviorIterator])
# mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod
// L1525
UnitBehaviorCount(libGame_gv_players[autoE34AC8EB_var].lv_heroUnit, "LunarFestivalSpeedBoost")
// L1526
UnitBehaviorCount(libGame_gv_players[autoE34AC8EB_var].lv_heroUnit, "LunarFestivalSpeedBoost")
// L1527
UnitBehaviorCount(libGame_gv_players[autoE34AC8EB_var].lv_heroUnit, "LunarFestivalSpeedBoost")
# mods/heroesdata.stormmod
// L2711
UnitBehaviorCount(lv_destroyedTowerUnit, "TownCannonTowerInvulnerable")
# mods/heroesdata.stormmod
// L224
UnitBehaviorCount(libGame_gv_players[lv_player].lv_heroUnit, "BucketOverdrive")
// L225
UnitBehaviorCount(libGame_gv_players[lv_player].lv_heroUnit, "TalentGatheringPowerCarry")
// L226
UnitBehaviorCount(libGame_gv_players[lv_player].lv_heroUnit, "TalentGatheringPowerStack")
// L609
UnitBehaviorCount(lp_purifierBeam, "ArtanisSpearofAdunPurifierBeamPrimed")
// L1494
UnitBehaviorCount(lp_owningUnit, "ShrubStatusController")
// L1499
UnitBehaviorCount(lp_owningUnit, "ShrubStatusController")
// L1704
UnitBehaviorCount(lv_vikingUnit, "LostVikingsVikingBriberyStacks")
// L1705
UnitBehaviorCount(lv_vikingUnit, "LostVikingsVikingBriberyStacks")
// L1916
UnitBehaviorCount(lp_viking, "LostVikingsCheckpointReachedCarry")
// L3076
UnitBehaviorCount(lv_misha, "RexxarMishaFollowFollow")
# mods/heroesdata.stormmod
// L1471
UnitBehaviorCount(lp_unit, "75PercentCCReduction")
// L1475
UnitBehaviorCount(lp_unit, "50PercentCCReduction")
// L1475
UnitBehaviorCount(lp_unit, "BarbarianWrathoftheBerserkerBase")
// L1475
UnitBehaviorCount(lp_unit, "IllidanMetamorphosis")
// L1475
UnitBehaviorCount(lp_unit, "IllidanMetamorphosisDemonicFormCarryBehavior")
// L2826
UnitBehaviorCount(lp_unit, "Dead")
// L6067
UnitBehaviorCount(lv_hero, "BucketOverdrive")
// L6071
UnitBehaviorCount(lv_hero, "0ManaCostBuff")
// L6736
UnitBehaviorCount(EventUnit(), "NoDeadMechanics")
// L9011
UnitBehaviorCount(lv_itUnit, "SpecialCaseNPCTakedownParticipant")
# mods/heroesdata.stormmod
// L2705
UnitBehaviorCount(lp_heroUnit, lv_behaviorArray[lp_abilIndex])
# mods/heroesdata.stormmod
— StartingExperienceLib.galaxy
// L3120
UnitBehaviorCount(libGame_gv_players[1].lv_heroUnit, "ShrubStatusController")
// L3758
UnitBehaviorCount(libGame_gv_players[libStEx_gv_sE_Player].lv_heroUnit, "Mounted")
# mods/heroesdata.stormmod
// L725
UnitBehaviorCount(libGame_gv_players[lv_player].lv_heroUnit, "RegenerationMaster")
# mods/heroesdata.stormmod
// L3769
UnitBehaviorCount(libGame_gv_players[lp_player].lv_heroUnit, "StitchesHooked")
// L3769
UnitBehaviorCount(libGame_gv_players[lp_player].lv_heroUnit, "VoidPrisonDisplay")
// L3769
UnitBehaviorCount(libGame_gv_players[lp_player].lv_heroUnit, "AmazonValkyrieImpaleImpaledTarget")
// L3769
UnitBehaviorCount(libGame_gv_players[lp_player].lv_heroUnit, "AmazonValkyrieImpaleFinalStun")
// L13313
UnitBehaviorCount(EventUnit(), "HeroGenericHasNoStatusBar")
// L13371
UnitBehaviorCount(EventUnit(), "HeroGenericHasNoStatusBar")
// L13577
UnitBehaviorCount(EventUnit(), "HeroGenericHasNoStatusBar")
// L13631
UnitBehaviorCount(EventUnit(), "HeroGenericHasNoStatusBar")
# mods/heroesmapmods/battlegroundmapmods/blackheartsbay.stormmod
// L71
UnitBehaviorCount(lp_heroUnit, "MapMechanicStack")
// L119
UnitBehaviorCount(lv_unit, "MapMechanicStack")
// L159
UnitBehaviorCount(lv_unitGroupUnit, "MapMechanicStack")
// L302
UnitBehaviorCount(lv_target, "BattleshipBombardTarget")
// L503
UnitBehaviorCount(lv_itBuilding, "BattleshipBombardTarget")
// L507
UnitBehaviorCount(lv_itBuilding, "BattleshipBombardTarget")
// L1473
UnitBehaviorCount(lv_collectingUnit, "MapMechanicStack")
# mods/heroesmapmods/battlegroundmapmods/hanamura.stormmod
// L391
UnitBehaviorCount(lv_itStructure, "HanamuraPayloadStructureTarget")
// L511
UnitBehaviorCount(lv_itBuilding, "HanamuraPayloadStructureTarget")
// L608
UnitBehaviorCount(lv_target, "HanamuraPayloadStructureTarget")
// L1348
UnitBehaviorCount(lv_heroUnit, "UltimateEvolutionBuff")
// L1348
UnitBehaviorCount(lv_heroUnit, "CapturePointAllowed")
# mods/heroesmapmods/battlegroundmapmods/hanamura.stormmod
// L612
UnitBehaviorCount(libNPLD_gv_neutralPayload.lv_unit, "Payload_AllyMonitor_1")
// L615
UnitBehaviorCount(libNPLD_gv_neutralPayload.lv_unit, "Payload_AllyMonitor_2")
// L618
UnitBehaviorCount(libNPLD_gv_neutralPayload.lv_unit, "Payload_AllyMonitor_3")
# mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmod
// L1804
UnitBehaviorCount(lv_heroUnit, "AbathurSymbioteHostBehavior")
# mods/heroesmapmods/battlegroundmapmods/skytemple.stormmod
// L579
UnitBehaviorCount(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_temple, "LuxoriaTempleScaling")
// L1656
UnitBehaviorCount(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_temple, "LuxoriaTempleScaling")
// L1660
UnitBehaviorCount(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_temple, "LuxoriaTempleScaling")
# mods/heroesmapmods/battlegroundmapmods/tombofthespiderqueen.stormmod
// L435
UnitBehaviorCount(lp_heroUnit, "MapMechanicStack")
// L1730
UnitBehaviorCount(lv_deadHero, "MapMechanicStack")
// L1886
UnitBehaviorCount(lv_heroUnit, "MapMechanicStack")
# mods/heroesmapmods/battlegroundmapmods/warheadjunction.stormmod
// L639
UnitBehaviorCount(auto0D10A15E_var, "HasMapMechanicTargetAbility")
# mods/heromods/alarak.stormmod
// L356
UnitBehaviorCount(lv_caster, "AlarakCounterStrikeReady")
// L424
UnitBehaviorCount(EventUnit(), "HeroGenericHasNoStatusBar")
// L492
UnitBehaviorCount(lv_pickedUnit, "AlarakSadismPureMaliceTalentStack")
// L574
UnitBehaviorCount(lv_transportingUnit, "AlarakSadismRiteofRakShirTalentDebuff")
// L574
UnitBehaviorCount(lv_transportedUnit, "AlarakSadismRiteofRakShirTalentDebuff")
// L599
UnitBehaviorCount(lv_newTarget, "AlarakSadismRiteofRakShirTalentDebuff")
// L651
UnitBehaviorCount(lv_deadUnit, "AlarakSadismRiteofRakShirTalentDebuff")
# mods/heromods/ana.stormmod
// L127
UnitBehaviorCount(lv_anaUnit, "AnaShrikeSelfHealPoisonTraitHealToken")
// L170
UnitBehaviorCount(lv_sleepUnit, "HeroGenericHasNoStatusBar")
# mods/heromods/auriel.stormmod
// L204
UnitBehaviorCount(libGame_gv_players[lv_aurielPlayer].lv_heroUnit, "Ultimate1Unlocked")
// L629
UnitBehaviorCount(lv_proxy, "AurielBestowHopeProxyBehavior")
// L669
UnitBehaviorCount(lv_aurielProxy, "AurielBestowHopeProxyBehavior")
// L865
UnitBehaviorCount(lv_auriel, "Ultimate1Unlocked")
// L1009
UnitBehaviorCount(libGame_gv_players[lv_iPlayer].lv_heroUnit, "Ultimate1Unlocked")
// L1745
UnitBehaviorCount(libHAUR_gv_heroAurielResurrectLostVikingsArray[lv_lVPlayer][lv_itViking].lv_vikingUnit, "LostVikingsPlayAgainSuppressResurrection")
// L1805
UnitBehaviorCount(lv_caster, "LostVikingsPlayAgainActivelyCasting")
// L2084
UnitBehaviorCount(libGame_gv_players[lv_aurielPlayer].lv_heroUnit, "Ultimate1Unlocked")
// L2128
UnitBehaviorCount(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer], "AurielResurrectActivelyResurrecting")
# mods/heromods/chogall.stormmod
// L601
UnitBehaviorCount(lv_choUnit, "GallPsychoticBreakDyingBehavior")
// L966
UnitBehaviorCount(libGame_gv_players[lv_player].lv_heroUnit, "ChoSurgingFistFakeChannel")
// L966
UnitBehaviorCount(libGame_gv_players[lv_player].lv_activeVehicle, "ChoSurgingFistFakeChannel")
// L1028
UnitBehaviorCount(lv_cho, "ChoSurgingFistFakeChannel")
// L2281
UnitBehaviorCount(EventUnit(), "AbathurUltimateEvolutionControlBehavior")
// L2322
UnitBehaviorCount(EventUnit(), "AbathurUltimateEvolutionControlBehavior")
// L2363
UnitBehaviorCount(EventUnit(), "AbathurUltimateEvolutionControlBehavior")
// L2410
UnitBehaviorCount(EventUnit(), "AbathurUltimateEvolutionControlBehavior")
// L2457
UnitBehaviorCount(EventUnit(), "AbathurUltimateEvolutionControlBehavior")
// L2506
UnitBehaviorCount(EventUnit(), "AbathurUltimateEvolutionControlBehavior")
# mods/heromods/dehaka.stormmod
// L133
UnitBehaviorCount(lv_dehakaUnit, "DehakaEssenceCollectionEnhancedAgilityQuestToken")
// L142
UnitBehaviorCount(lv_dehakaUnit, "DehakaEssenceCollectionEnhancedAgilityQuestToken")