# Unit Has Behavior (Enabled)
Grammar — unit has behavior
Flags —Native
|Function
Returns true if the stack count for this behavior is > 0
# Arguments
unit
— Unitstring
<gamelink::Behavior> — Behavior
Returns — bool
native bool UnitHasBehavior(
unit inUnit,
string inBehavior,
);
# Related
Category: Behavior / Basic
- Remove Behaviors By Category —
void
— UnitBehaviorRemoveCategory - Remove Behavior (Player) —
void
— UnitBehaviorRemovePlayer - Remove Behavior —
void
— UnitBehaviorRemove - Add Behavior (Player) —
void
— UnitBehaviorAddPlayer - Add Behavior —
void
— UnitBehaviorAdd - Set Behavior Count —
void
— libNtve_gf_SetBehaviorCount - Number Of Behaviors On Unit —
int
— UnitBehaviorCountAll - Unit Behavior —
string
<gamelink::Behavior> — UnitBehaviorGet - Unit Has Behavior —
bool
— UnitHasBehavior2 - Unit Has Behavior (Enabled) —
bool
— UnitHasBehavior - Unit Behavior Enabled —
bool
— UnitBehaviorEnabled - Stack Count Of Behavior On Unit —
int
— UnitBehaviorCount - Behavior Has Flag —
bool
— UnitBehaviorHasFlag - Transfer Behavior —
void
— UnitBehaviorTransfer - Set Unit Behavior Duration —
void
— UnitBehaviorSetDuration - Set Unit Behavior Duration Remaining —
void
— UnitBehaviorSetDurationRemaining - Duration Remaining Of Behavior On Unit —
fixed
— UnitBehaviorDuration - Duration Of Behavior On Unit —
fixed
— UnitBehaviorDurationTotal - Set Unit Behavior Spawn Count —
void
— UnitBehaviorSpawn - Unit Behavior Effect Player —
int
— UnitBehaviorEffectPlayer - Unit Behavior Effect Unit —
unit
— UnitBehaviorEffectUnit - Set Unit Behavior User Data —
void
— UnitBehaviorEffectTreeSetUserData - User Data Of Behavior On Unit —
fixed
— UnitBehaviorEffectTreeUserData - User Data Of Behavior On Unit Exists —
bool
— UnitBehaviorEffectTreeUserDataExists - Unit Behavior Changes —
void
— TriggerAddEventUnitBehaviorChange - Unit Behavior Changes From Category —
void
— TriggerAddEventUnitBehaviorChangeFromCategory - Triggering Behavior —
string
<gamelink::Behavior> — EventUnitBehavior - Triggering Behavior Change —
int
<preset::BehaviorChange> — EventUnitBehaviorChange - Unit Behavior Damage Modify Remaining —
fixed
— UnitBehaviorDamageModifyRemaining - Unit Behavior Damage Modify Limit —
fixed
— UnitBehaviorDamageModifyLimit - For Each Behavior On Unit — macro
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3002
Wait(1.0, c_timeGame);
}
while ((UnitHasBehavior(lp_powerup, "SS_PowerupMorphToBomb") == true)) {
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToBomb", 1);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3005
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToBomb", 1);
}
while ((UnitHasBehavior(lp_powerup, "SS_PowerupMorphToHealth") == true)) {
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToHealth", 1);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3008
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToHealth", 1);
}
while ((UnitHasBehavior(lp_powerup, "SS_PowerupMorphToSideMissiles") == true)) {
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToSideMissiles", 1);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3011
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToSideMissiles", 1);
}
while ((UnitHasBehavior(lp_powerup, "SS_PowerupMorphToStrongerMissiles") == true)) {
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToStrongerMissiles", 1);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:7378
}
else if (autoB7505698_val == "SS_PowerupSideMissiles") {
if ((UnitHasBehavior(gv_viking, "SS_PowerUpStrong") == true)) {
UnitBehaviorRemove(gv_viking, "SS_PowerUpStrong", 2);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:7383
else {
}
if ((UnitHasBehavior(gv_viking, "SS_PowerUpDiagonal1") == true)) {
UnitBehaviorAddPlayer(gv_viking, "SS_PowerUpDiagonal2", gv_p1_USER, 1);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:7403
}
else if (autoB7505698_val == "SS_PowerupHealth") {
if ((UnitHasBehavior(gv_viking, "SS_PowerUpHealth1") == true)) {
UnitBehaviorAddPlayer(gv_viking, "SS_PowerUpHealth2", gv_p1_USER, 1);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:7418
}
else if (autoB7505698_val == "SS_PowerupStrongerMissiles") {
if ((UnitHasBehavior(gv_viking, "SS_PowerUpDiagonal1") == true)) {
UnitBehaviorRemove(gv_viking, "SS_PowerUpDiagonal1", 2);
UnitBehaviorRemove(gv_viking, "SS_PowerUpDiagonal2", 2);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:1521
auto338F5CC8_var = UnitGroupUnitFromEnd(auto338F5CC8_g, auto338F5CC8_u);
if (auto338F5CC8_var == null) { break; }
if ((UnitHasBehavior(auto338F5CC8_var, "CarryMineralFieldMinerals") == true)) {
UnitIssueOrder(auto338F5CC8_var, Order(AbilityCommand("SCVHarvest", 1)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:1623
auto87EA6112_var = UnitGroupUnitFromEnd(auto87EA6112_g, auto87EA6112_u);
if (auto87EA6112_var == null) { break; }
if ((UnitHasBehavior(auto87EA6112_var, "SolarCombustion") == false) && ((UnitGetType(auto87EA6112_var) == "InfestedAbomination") || (UnitGetType(auto87EA6112_var) == "InfestedAbominationBurrowed") || (UnitGetType(auto87EA6112_var) == "InfestedTerranCampaign") || (UnitGetType(auto87EA6112_var) == "InfestedTerranCampaignBurrowed") || (UnitGetType(auto87EA6112_var) == "InfestedCivilian") || (UnitGetType(auto87EA6112_var) == "InfestedCivilianBurrowed"))) {
UnitGroupAdd(lv_doomedUnits, auto87EA6112_var);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:5090
}
if (!((UnitHasBehavior(EventUnit(), "Passive") == false))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:5143
}
if (!((UnitHasBehavior(EventUnit(), "Passive") == false))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:5196
}
if (!((UnitHasBehavior(EventUnit(), "Passive") == false))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:1685
}
if (!((UnitHasBehavior(EventUnit(), "CarryTerrazineNode") == false))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:2084
// Conditions
if (testConds) {
if (!((UnitHasBehavior(EventUnit(), "CarryTerrazineNode") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:2092
}
if (!((UnitHasBehavior(EventUnit(), "HarvestingTerrazine") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:2781
}
if (!((UnitHasBehavior(EventUnit(), "CarryTerrazineNode") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:1209
}
if ((UnitGetOwner(EventUnitTargetUnit()) != gv_pLAYER01_USER) && (UnitHasBehavior(EventUnitTargetUnit(), "SpectreCloaking") == true)) {
UnitIssueOrder(EventUnitTargetUnit(), Order(AbilityCommand("RogueGhostCloak", 1)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:1214
Wait(0.5, c_timeGame);
if ((UnitGetOwner(EventUnitTargetUnit()) != gv_pLAYER01_USER) && (UnitHasBehavior(EventUnitTargetUnit(), "SpectreCloaking") == true)) {
UnitIssueOrder(EventUnitTargetUnit(), Order(AbilityCommand("RogueGhostCloak", 1)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:3167
}
if ((UnitGetOwner(UnitFromId(684)) == gv_pLAYER02_TOSH) && (UnitGetPropertyFixed(UnitFromId(684), c_unitPropEnergy, c_unitPropCurrent) >= 25.0) && (UnitHasBehavior(UnitFromId(684), "BansheeCloak") != true)) {
UnitIssueOrder(UnitFromId(684), Order(AbilityCommand("BansheeCloak", 0)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:4770
}
if (!((UnitHasBehavior(EventUnit(), "Domination") == false))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:4840
}
if (!((UnitHasBehavior(libNtve_gf_KillingUnit(), "Domination") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:5964
auto3878D2A0_var = UnitGroupUnitFromEnd(auto3878D2A0_g, auto3878D2A0_u);
if (auto3878D2A0_var == null) { break; }
if ((UnitHasBehavior(auto3878D2A0_var, "Domination") == true)) {
libNtve_gf_ShowHideUnit(auto3878D2A0_var, false);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:6244
auto9FB3EEE1_var = UnitGroupUnitFromEnd(auto9FB3EEE1_g, auto9FB3EEE1_u);
if (auto9FB3EEE1_var == null) { break; }
if ((UnitHasBehavior(auto9FB3EEE1_var, "Domination") == true)) {
libNtve_gf_ShowHideUnit(auto9FB3EEE1_var, false);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus04.sc2map/MapScript.galaxy:2515
}
if (!(((UnitHasBehavior(libNtve_gf_KillingUnit(), "BansheeCloak") == true) || (UnitHasBehavior(libNtve_gf_KillingUnit(), "BansheeCloakCrossSpectrumDampeners") == true)))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus04.sc2map/MapScript.galaxy:2515
}
if (!(((UnitHasBehavior(libNtve_gf_KillingUnit(), "BansheeCloak") == true) || (UnitHasBehavior(libNtve_gf_KillingUnit(), "BansheeCloakCrossSpectrumDampeners") == true)))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7095
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7138
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7181
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7224
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7267
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7433
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7476
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7519
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7562
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:7605
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:576
UnitIssueOrder(lp_activatedunit, OrderSetAutoCast(AbilityCommand("SapStructure", 0), true), c_orderQueueReplace);
if ((UnitHasBehavior(gv_tHEONERAYNOR, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONERAYNOR);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:580
}
if ((UnitHasBehavior(gv_tHEONESTETMAN, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONESTETMAN);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:584
}
if ((UnitHasBehavior(gv_tHEONESWANN, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONESWANN);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:588
}
if ((UnitHasBehavior(gv_tHEONETYCHUS, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONETYCHUS);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:7923
if ((WorldHeight(c_heightMapGround, UnitGetPosition(autoD60EF79C_var)) <= gv__4HeightOfLava)) {
PlayerCreateEffectUnit(0, "LavaFireDamage", autoD60EF79C_var);
if ((UnitHasBehavior(autoD60EF79C_var, "Incapacitated") == true)) {
UnitSetPropertyFixed(autoD60EF79C_var, c_unitPropLife, (UnitGetPropertyFixed(autoD60EF79C_var, c_unitPropLife, c_unitPropCurrent) - 10.0));
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:8291
lv_targets = UnitGroup(null, gv_p1_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
if ((UnitHasBehavior(gv_tHEONERAYNOR, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONERAYNOR);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:8295
}
if ((UnitHasBehavior(gv_tHEONESTETMAN, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONESTETMAN);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:8299
}
if ((UnitHasBehavior(gv_tHEONESWANN, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONESWANN);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:8303
}
if ((UnitHasBehavior(gv_tHEONETYCHUS, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONETYCHUS);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:8640
}
if ((UnitHasBehavior(gv_tHEONERAYNOR, "Incapacitated") == true) && (UnitGroupHasUnit(gv_incappedHeroes, gv_tHEONERAYNOR) == false)) {
UnitGroupAdd(gv_incappedHeroes, gv_tHEONERAYNOR);
gv_achievementHeroIncapCounter += 1;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:2026
}
if ((UnitHasBehavior(UnitFromId(230), "ZeratulStun") == false)) {
UnitSetState(UnitFromId(230), c_unitStateInvulnerable, true);
UnitIssueOrder(UnitFromId(230), Order(AbilityCommand("BurrowUltraliskDown", 0)), c_orderQueueReplace);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:4440
}
if ((UnitHasBehavior(EventUnit(), "ZeratulStun") == false) && (UnitGroupCount(UnitGroup("Stalker", gv_p1_USER, RegionCircle(UnitGetPosition(EventUnit()), 7.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) == 0)) {
UnitIssueOrder(EventUnit(), Order(AbilityCommand("BurrowUltraliskDown", 0)), c_orderQueueReplace);
while (!((libNtve_gf_UnitIsVisibleToPlayer(EventUnit(), gv_p1_USER) == false))) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:5303
}
if ((UnitHasBehavior(lv_nydusUnit, "ZeratulStun") == false) && (TriggerIsEnabled(gt_Enemiesare99999Staggered) == false) && (UnitGroupCount(gv_nydusTotalSpawnlings, c_unitCountAlive) <= 50)) {
SoundPlayAtPoint(SoundLink("NydusWorm_Unload", -1), PlayerGroupAll(), UnitGetPosition(lv_nydusUnit), 1.0, 100.0, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_nydusUnit), c_animNameDefault, "Spell", 0, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:5324
}
if ((UnitHasBehavior(lv_nydusUnit, "ZeratulStun") == false) && (TriggerIsEnabled(gt_Enemiesare99999Staggered) == false) && (UnitGroupCount(gv_nydusTotalSpawnlings, c_unitCountAlive) <= 50)) {
SoundPlayAtPoint(SoundLink("NydusWorm_Unload", -1), PlayerGroupAll(), UnitGetPosition(lv_nydusUnit), 1.0, 100.0, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_nydusUnit), c_animNameDefault, "Spell", 0, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:5375
autoE5915620_var = UnitGroupUnitFromEnd(autoE5915620_g, autoE5915620_u);
if (autoE5915620_var == null) { break; }
if ((UnitHasBehavior(autoE5915620_var, "ZeratulStun") == false) && (OrderGetAbilityCommand(UnitOrder(autoE5915620_var, 0)) != AbilityCommand("attack", 0)) && (OrderGetAbilityCommand(UnitOrder(autoE5915620_var, 0)) != AbilityCommand("move", 3)) && (OrderGetAbilityCommand(UnitOrder(autoE5915620_var, 0)) != AbilityCommand("move", 0))) {
UnitIssueOrder(autoE5915620_var, OrderTargetingPoint(AbilityCommand("attack", 0), RegionRandomPoint(RegionFromId(126))), c_orderQueueReplace);
UnitIssueOrder(autoE5915620_var, OrderTargetingPoint(AbilityCommand("attack", 0), RegionRandomPoint(RegionFromId(127))), c_orderQueueAddToEnd);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:7101
}
if ((UnitHasBehavior(lv_unit, "ZeratulStun") == false)) {
SoundPlayAtPoint(SoundLink("NydusWorm_Unload", -1), PlayerGroupAll(), UnitGetPosition(lv_unit), 1.0, 100.0, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_unit), c_animNameDefault, "Spell", 0, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:7113
}
if ((UnitHasBehavior(lv_unit, "ZeratulStun") == false)) {
SoundPlayAtPoint(SoundLink("NydusWorm_Unload", -1), PlayerGroupAll(), UnitGetPosition(lv_unit), 1.0, 100.0, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_unit), c_animNameDefault, "Spell", 0, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:7473
auto0685ADAD_var = UnitGroupUnitFromEnd(auto0685ADAD_g, auto0685ADAD_u);
if (auto0685ADAD_var == null) { break; }
if ((UnitHasBehavior(auto0685ADAD_var, "ZeratulStun") == false) && (OrderGetAbilityCommand(UnitOrder(auto0685ADAD_var, 0)) != AbilityCommand("attack", 0)) && (OrderGetAbilityCommand(UnitOrder(auto0685ADAD_var, 0)) != AbilityCommand("move", 3)) && (OrderGetAbilityCommand(UnitOrder(auto0685ADAD_var, 0)) != AbilityCommand("move", 0))) {
if ((UnitGetCustomValue(auto0685ADAD_var, 0) < UnitGetCustomValue(auto0685ADAD_var, 5))) {
UnitSetCustomValue(auto0685ADAD_var, 0, (UnitGetCustomValue(auto0685ADAD_var, 0) + 0.5));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:265
// Implementation
if ((UnitIsAlive(lp_nydus) == true)) {
if ((UnitHasBehavior(lp_nydus, "ZeratulStun") == true)) {
while (!((UnitHasBehavior(lp_nydus, "ZeratulStun") == false))) {
Wait(0.5, c_timeGame);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:266
if ((UnitIsAlive(lp_nydus) == true)) {
if ((UnitHasBehavior(lp_nydus, "ZeratulStun") == true)) {
while (!((UnitHasBehavior(lp_nydus, "ZeratulStun") == false))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:2646
if ((UnitIsAlive(gv_nydusWormP03) == true)) {
while (!((UnitHasBehavior(gv_nydusWormP03, "ZeratulStun") == false))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:2675
if ((UnitIsAlive(gv_nydusWormP04) == true)) {
while (!((UnitHasBehavior(gv_nydusWormP04, "ZeratulStun") == false))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul04.sc2map/MapScript.galaxy:4350
VisRevealArea(gv_p01_PLAYER, RegionCircle(UnitGetPosition(UnitLastCreated()), 4.0), 4.0, false);
Wait(3.7, c_timeGame);
if ((UnitGroupCount(UnitGroup(null, gv_p01_PLAYER, RegionCircle(UnitGetPosition(lv_unit), 9.0), UnitFilter((1 << c_targetFilterGround) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) >= 1) && (UnitIsAlive(lv_unit) == true) && (UnitHasBehavior(lv_unit, "ZeratulStun") == false)) {
SoundPlayAtPoint(SoundLink("NydusWorm_Unload", -1), PlayerGroupAll(), UnitGetPosition(lv_unit), 1.0, 100.0, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_unit), c_animNameDefault, "Spell", 0, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul04.sc2map/MapScript.galaxy:4370
}
if ((UnitGroupCount(UnitGroup(null, gv_p01_PLAYER, RegionCircle(UnitGetPosition(lv_unit), 9.0), UnitFilter((1 << c_targetFilterGround) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) >= 1) && (UnitHasBehavior(lv_unit, "ZeratulStun") == false)) {
SoundPlayAtPoint(SoundLink("NydusWorm_Unload", -1), PlayerGroupAll(), UnitGetPosition(lv_unit), 1.0, 100.0, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_unit), c_animNameDefault, "Spell", 0, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul04.sc2map/MapScript.galaxy:4424
VisRevealArea(gv_p01_PLAYER, RegionCircle(UnitGetPosition(UnitLastCreated()), 4.0), 4.0, false);
Wait(3.7, c_timeGame);
if ((UnitGroupCount(UnitGroup(null, gv_p01_PLAYER, RegionCircle(UnitGetPosition(lv_unit), 9.0), UnitFilter((1 << c_targetFilterGround) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) >= 1) && (UnitIsAlive(lv_unit) == true) && (UnitHasBehavior(lv_unit, "ZeratulStun") == false)) {
SoundPlayAtPoint(SoundLink("NydusWorm_Unload", -1), PlayerGroupAll(), UnitGetPosition(lv_unit), 1.0, 100.0, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_unit), c_animNameDefault, "Spell", 0, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul04.sc2map/MapScript.galaxy:4436
}
if ((UnitGroupCount(UnitGroup(null, gv_p01_PLAYER, RegionCircle(UnitGetPosition(lv_unit), 9.0), UnitFilter((1 << c_targetFilterGround) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) >= 1) && (UnitHasBehavior(lv_unit, "ZeratulStun") == false)) {
SoundPlayAtPoint(SoundLink("NydusWorm_Unload", -1), PlayerGroupAll(), UnitGetPosition(lv_unit), 1.0, 100.0, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_unit), c_animNameDefault, "Spell", 0, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:853
UnitGroupLoopBegin(UnitGroup("Gateway", gv_p3_ENEMY_PROTOSS, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterUnderConstruction - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
while (!UnitGroupLoopDone()) {
if ((UnitHasBehavior(UnitGroupLoopCurrent(), "TimeWarpProduction") == false)) {
PlayerCreateEffectUnit(gv_p3_ENEMY_PROTOSS, "ChronoBoost", UnitGroupLoopCurrent());
TriggerEnable(TriggerGetCurrent(), false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:3002
Wait(1.0, c_timeGame);
}
while ((UnitHasBehavior(lp_powerup, "SS_PowerupMorphToBomb") == true)) {
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToBomb", 1);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:3005
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToBomb", 1);
}
while ((UnitHasBehavior(lp_powerup, "SS_PowerupMorphToHealth") == true)) {
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToHealth", 1);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:3008
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToHealth", 1);
}
while ((UnitHasBehavior(lp_powerup, "SS_PowerupMorphToSideMissiles") == true)) {
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToSideMissiles", 1);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:3011
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToSideMissiles", 1);
}
while ((UnitHasBehavior(lp_powerup, "SS_PowerupMorphToStrongerMissiles") == true)) {
UnitBehaviorRemove(lp_powerup, "SS_PowerupMorphToStrongerMissiles", 1);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:7378
}
else if (autoB7505698_val == "SS_PowerupSideMissiles") {
if ((UnitHasBehavior(gv_viking, "SS_PowerUpStrong") == true)) {
UnitBehaviorRemove(gv_viking, "SS_PowerUpStrong", 2);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:7383
else {
}
if ((UnitHasBehavior(gv_viking, "SS_PowerUpDiagonal1") == true)) {
UnitBehaviorAddPlayer(gv_viking, "SS_PowerUpDiagonal2", gv_p1_USER, 1);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:7403
}
else if (autoB7505698_val == "SS_PowerupHealth") {
if ((UnitHasBehavior(gv_viking, "SS_PowerUpHealth1") == true)) {
UnitBehaviorAddPlayer(gv_viking, "SS_PowerUpHealth2", gv_p1_USER, 1);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:7418
}
else if (autoB7505698_val == "SS_PowerupStrongerMissiles") {
if ((UnitHasBehavior(gv_viking, "SS_PowerUpDiagonal1") == true)) {
UnitBehaviorRemove(gv_viking, "SS_PowerUpDiagonal1", 2);
UnitBehaviorRemove(gv_viking, "SS_PowerUpDiagonal2", 2);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson01.sc2map — MapScript.galaxy:1521
auto338F5CC8_var = UnitGroupUnitFromEnd(auto338F5CC8_g, auto338F5CC8_u);
if (auto338F5CC8_var == null) { break; }
if ((UnitHasBehavior(auto338F5CC8_var, "CarryMineralFieldMinerals") == true)) {
UnitIssueOrder(auto338F5CC8_var, Order(AbilityCommand("SCVHarvest", 1)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson02.sc2map — MapScript.galaxy:1623
auto87EA6112_var = UnitGroupUnitFromEnd(auto87EA6112_g, auto87EA6112_u);
if (auto87EA6112_var == null) { break; }
if ((UnitHasBehavior(auto87EA6112_var, "SolarCombustion") == false) && ((UnitGetType(auto87EA6112_var) == "InfestedAbomination") || (UnitGetType(auto87EA6112_var) == "InfestedAbominationBurrowed") || (UnitGetType(auto87EA6112_var) == "InfestedTerranCampaign") || (UnitGetType(auto87EA6112_var) == "InfestedTerranCampaignBurrowed") || (UnitGetType(auto87EA6112_var) == "InfestedCivilian") || (UnitGetType(auto87EA6112_var) == "InfestedCivilianBurrowed"))) {
UnitGroupAdd(lv_doomedUnits, auto87EA6112_var);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2map — MapScript.galaxy:5090
}
if (!((UnitHasBehavior(EventUnit(), "Passive") == false))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2map — MapScript.galaxy:5143
}
if (!((UnitHasBehavior(EventUnit(), "Passive") == false))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2map — MapScript.galaxy:5196
}
if (!((UnitHasBehavior(EventUnit(), "Passive") == false))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:1685
}
if (!((UnitHasBehavior(EventUnit(), "CarryTerrazineNode") == false))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:2084
// Conditions
if (testConds) {
if (!((UnitHasBehavior(EventUnit(), "CarryTerrazineNode") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:2092
}
if (!((UnitHasBehavior(EventUnit(), "HarvestingTerrazine") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2map — MapScript.galaxy:2781
}
if (!((UnitHasBehavior(EventUnit(), "CarryTerrazineNode") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:1209
}
if ((UnitGetOwner(EventUnitTargetUnit()) != gv_pLAYER01_USER) && (UnitHasBehavior(EventUnitTargetUnit(), "SpectreCloaking") == true)) {
UnitIssueOrder(EventUnitTargetUnit(), Order(AbilityCommand("RogueGhostCloak", 1)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:1214
Wait(0.5, c_timeGame);
if ((UnitGetOwner(EventUnitTargetUnit()) != gv_pLAYER01_USER) && (UnitHasBehavior(EventUnitTargetUnit(), "SpectreCloaking") == true)) {
UnitIssueOrder(EventUnitTargetUnit(), Order(AbilityCommand("RogueGhostCloak", 1)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:3167
}
if ((UnitGetOwner(UnitFromId(684)) == gv_pLAYER02_TOSH) && (UnitGetPropertyFixed(UnitFromId(684), c_unitPropEnergy, c_unitPropCurrent) >= 25.0) && (UnitHasBehavior(UnitFromId(684), "BansheeCloak") != true)) {
UnitIssueOrder(UnitFromId(684), Order(AbilityCommand("BansheeCloak", 0)), c_orderQueueReplace);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:4770
}
if (!((UnitHasBehavior(EventUnit(), "Domination") == false))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:4840
}
if (!((UnitHasBehavior(libNtve_gf_KillingUnit(), "Domination") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:5964
auto3878D2A0_var = UnitGroupUnitFromEnd(auto3878D2A0_g, auto3878D2A0_u);
if (auto3878D2A0_var == null) { break; }
if ((UnitHasBehavior(auto3878D2A0_var, "Domination") == true)) {
libNtve_gf_ShowHideUnit(auto3878D2A0_var, false);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:6244
auto9FB3EEE1_var = UnitGroupUnitFromEnd(auto9FB3EEE1_g, auto9FB3EEE1_u);
if (auto9FB3EEE1_var == null) { break; }
if ((UnitHasBehavior(auto9FB3EEE1_var, "Domination") == true)) {
libNtve_gf_ShowHideUnit(auto9FB3EEE1_var, false);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus04.sc2map — MapScript.galaxy:2515
}
if (!(((UnitHasBehavior(libNtve_gf_KillingUnit(), "BansheeCloak") == true) || (UnitHasBehavior(libNtve_gf_KillingUnit(), "BansheeCloakCrossSpectrumDampeners") == true)))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus04.sc2map — MapScript.galaxy:2515
}
if (!(((UnitHasBehavior(libNtve_gf_KillingUnit(), "BansheeCloak") == true) || (UnitHasBehavior(libNtve_gf_KillingUnit(), "BansheeCloakCrossSpectrumDampeners") == true)))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7095
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7138
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7181
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7224
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7267
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV01, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7433
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7476
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7519
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7562
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian01.sc2map — MapScript.galaxy:7605
// Conditions
if (testConds) {
if (!((UnitHasBehavior(gv_sCV02, "CarrySandbags") == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02a.sc2map — MapScript.galaxy:576
UnitIssueOrder(lp_activatedunit, OrderSetAutoCast(AbilityCommand("SapStructure", 0), true), c_orderQueueReplace);
if ((UnitHasBehavior(gv_tHEONERAYNOR, "Incapacitated") == true)) {
UnitGroupRemove(lv_targets, gv_tHEONERAYNOR);
}