# Tech Tree Behavior Count For Unit
Grammar — Count of behaviorType|Behavior at inUnit, counting countType
Flags —Native
|Function
Returns the count of the specified behavior for the specified unit.
# Arguments
unit
— Unitstring
<gamelink::Behavior> — Behavior Typeint
<preset::TechTreeCountType> — Count Type
Returns — int
native int UnitTechTreeBehaviorCount(
unit inUnit,
string behaviorType,
int countType,
);
# Related
Category: Tech Tree / Counts
- Behavior Count For Player —
int
— TechTreeBehaviorCount - Ability Count For Player —
int
— TechTreeAbilityCount - Unit Count For Player —
int
— TechTreeUnitCount - Unit Alias Count For Player —
int
— TechTreeUnitAliasCount - Upgrade Count For Player —
int
— TechTreeUpgradeCount - Tech Tree Behavior Count For Unit —
int
— UnitTechTreeBehaviorCount - Tech Tree Unit Count For Unit —
int
— UnitTechTreeUnitCount - Tech Tree Upgrade Count For Unit —
int
— UnitTechTreeUpgradeCount
# Examples
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:140
}
if (((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountQueuedOrBetter) >= 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountQueuedOrBetter) >= 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountQueuedOrBetter) >= 1))) {
if ((lv_count < 240)) {
lv_count += 1;
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:140
}
if (((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountQueuedOrBetter) >= 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountQueuedOrBetter) >= 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountQueuedOrBetter) >= 1))) {
if ((lv_count < 240)) {
lv_count += 1;
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:140
}
if (((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountQueuedOrBetter) >= 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountQueuedOrBetter) >= 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountQueuedOrBetter) >= 1))) {
if ((lv_count < 240)) {
lv_count += 1;
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:1080
// Implementation
if (((libGame_gv_gameOver == true) || (TimerGetRemaining(libMHPP_gv_mHPPTransmissions.lv_approachingCheckpointWarningTimerCD) > 0.0)) && ((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountCompleteOnly) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountCompleteOnly) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountCompleteOnly) < 1))) {
return true;
}
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:1080
// Implementation
if (((libGame_gv_gameOver == true) || (TimerGetRemaining(libMHPP_gv_mHPPTransmissions.lv_approachingCheckpointWarningTimerCD) > 0.0)) && ((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountCompleteOnly) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountCompleteOnly) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountCompleteOnly) < 1))) {
return true;
}
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:1080
// Implementation
if (((libGame_gv_gameOver == true) || (TimerGetRemaining(libMHPP_gv_mHPPTransmissions.lv_approachingCheckpointWarningTimerCD) > 0.0)) && ((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountCompleteOnly) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountCompleteOnly) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountCompleteOnly) < 1))) {
return true;
}
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:1288
// Implementation
if (((libGame_gv_gameOver == true) || (TimerGetRemaining(libMHPP_gv_mHPPTransmissions.lv_approachingDestinationWarningTimerCD) > 0.0)) && ((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountQueuedOrBetter) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountQueuedOrBetter) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountQueuedOrBetter) < 1))) {
return true;
}
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:1288
// Implementation
if (((libGame_gv_gameOver == true) || (TimerGetRemaining(libMHPP_gv_mHPPTransmissions.lv_approachingDestinationWarningTimerCD) > 0.0)) && ((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountQueuedOrBetter) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountQueuedOrBetter) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountQueuedOrBetter) < 1))) {
return true;
}
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:1288
// Implementation
if (((libGame_gv_gameOver == true) || (TimerGetRemaining(libMHPP_gv_mHPPTransmissions.lv_approachingDestinationWarningTimerCD) > 0.0)) && ((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountQueuedOrBetter) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountQueuedOrBetter) < 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountQueuedOrBetter) < 1))) {
return true;
}
mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod — base.stormdata/LibMHPP.galaxy:1789
}
if (((UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior1", c_techCountQueuedOrBetter) >= 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior2", c_techCountQueuedOrBetter) >= 1) || (UnitTechTreeBehaviorCount(libMHPP_gv_payload.lv_payload, "PayloadAllyProximityBehavior3", c_techCountQueuedOrBetter) >= 1))) {
libMHPP_gf_MHPPOvertime();
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:3161
}
else {
if ((UnitTechTreeBehaviorCount(lv_rexxar, "ShrubStatusController", c_techCountQueuedOrBetter) <= 0)) {
if ((DistanceBetweenPoints(UnitGetPosition(lv_misha), UnitGetPosition(lv_rexxar)) > 3.0) && ((OrderGetAbilityCommand(UnitOrder(lv_misha, 0)) == AbilityCommand("attack", 0)) || (UnitOrderCount(lv_misha) == 0) || (DistanceBetweenPoints(OrderGetTargetPosition(UnitOrder(lv_misha, 0)), UnitGetPosition(lv_rexxar)) > 6.0))) {
UnitIssueOrder(lv_misha, OrderTargetingPoint(AbilityCommand("move", 0), PointWithOffsetPolar(UnitGetPosition(lv_rexxar), 3.0, libNtve_gf_RandomAngle())), c_orderQueueReplace);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:3175
}
else {
if ((UnitTechTreeBehaviorCount(lv_misha, "ShrubStatusController", c_techCountQueuedOrBetter) == 0) && (OrderGetAbilityCommand(UnitOrder(lv_misha, 0)) != AbilityCommand("move", 0))) {
UnitAbilityEnable(lv_misha, "attack", true);
lv_itNearbyShrubChecks = 0;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:3258
else {
lv_autoAquired = true;
if ((UnitTechTreeBehaviorCount(lv_rexxar, "ShrubStatusController", c_techCountQueuedOrBetter) > 0) && (UnitTechTreeBehaviorCount(lv_misha, "ShrubStatusController", c_techCountQueuedOrBetter) == 0) && (OrderGetAbilityCommand(UnitOrder(lv_misha, 0)) != AbilityCommand("move", 0))) {
lv_itNearbyShrubChecks = 0;
for ( ; ( (auto817393C0_ai >= 0 && lv_itNearbyShrubChecks <= auto817393C0_ae) || (auto817393C0_ai < 0 && lv_itNearbyShrubChecks >= auto817393C0_ae) ) ; lv_itNearbyShrubChecks += auto817393C0_ai ) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:3258
else {
lv_autoAquired = true;
if ((UnitTechTreeBehaviorCount(lv_rexxar, "ShrubStatusController", c_techCountQueuedOrBetter) > 0) && (UnitTechTreeBehaviorCount(lv_misha, "ShrubStatusController", c_techCountQueuedOrBetter) == 0) && (OrderGetAbilityCommand(UnitOrder(lv_misha, 0)) != AbilityCommand("move", 0))) {
lv_itNearbyShrubChecks = 0;
for ( ; ( (auto817393C0_ai >= 0 && lv_itNearbyShrubChecks <= auto817393C0_ae) || (auto817393C0_ai < 0 && lv_itNearbyShrubChecks >= auto817393C0_ae) ) ; lv_itNearbyShrubChecks += auto817393C0_ai ) {