# Unit Classification Check
Grammar — u is s|State Type
Flags —Native
|Function
Returns true if a unit is a specific class type.
# Arguments
unit
— Unitint
<preset::unitState> — State
Returns — bool
native bool UnitTestState(unit inUnit, int inState);
# Related
Category: Unit / Properties
- Unit Type Of Unit —
string
<gamelink::Unit> — UnitGetType - Unit Tag —
int
— UnitGetTag - Unit Seed —
int
— UnitGetSeed - Unit Property Changes —
void
— TriggerAddEventUnitProperty - Triggering Unit Property —
int
<preset::Unit_Property> — EventUnitProperty - Triggering Unit Property Change (Integer) —
int
— EventUnitPropertyChangeInt - Triggering Unit Property Change (Real) —
fixed
— EventUnitPropertyChangeFixed - Set Unit Property —
void
— UnitSetPropertyFixed - Set Unit State —
void
— UnitSetState - Set Unit Seed —
void
— UnitSetSeed - Reset Unit Seed —
void
— UnitResetSeed - Make Unit Invulnerable —
void
— libNtve_gf_MakeUnitInvulnerable - Make Unit Uncommandable —
void
— libNtve_gf_MakeUnitUncommandable - Unit Property —
fixed
— UnitGetPropertyFixed - Unit Property (Int) —
int
— UnitGetPropertyInt - Unit Type Property —
fixed
— UnitTypeGetProperty - Unit Classification Check —
bool
— UnitTestState - Unit Type Classification Check —
bool
— UnitTypeTestFlag - Unit Type Attribute Check —
bool
— UnitTypeTestAttribute - Unit Targetable Check —
bool
— UnitTestPlane - Unit Is Invulnerable —
bool
— libNtve_gf_UnitIsInvulnerable - Unit Kills —
int
— libNtve_gf_UnitGetPropertyKills - Unit Resources —
int
— libNtve_gf_UnitGetPropertyResources - Unit Attachment Point —
point
— UnitGetAttachmentPoint - Name Of Unit Type —
text
— UnitTypeGetName - Gender Code Of Unit Type —
string
— UnitTypeGetGenderCode - Unit Type Cost —
int
— UnitTypeGetCost - Unit Type Is Affected By Upgrade —
bool
— UnitTypeIsAffectedByUpgrade - Reset Movement Speed —
void
— UnitResetSpeed - Unit Uses Mover —
bool
— UnitMoverExists - Unit Type Uses Mover —
bool
— libNtve_gf_UnitMoverExists - Unit Type From String —
string
<gamelink::Unit> — UnitTypeFromString - Set Unit Color —
void
— UnitSetTeamColorIndex - Set Unit Info Button - Ability Tooltip —
void
— libNtve_gf_SetUnitInfoButtonAbilityTooltip - Set Unit Info Button - Button Tooltip —
void
— libNtve_gf_SetUnitInfoButtonButtonTooltip - Set Unit Info Button - Item Tooltip —
void
— libNtve_gf_SetUnitInfoButtonItemTooltip - Reset Unit Info Button - Ability Tooltip —
void
— libNtve_gf_ResetUnitInfoButtonAbilityTooltip - Reset Unit Info Button - Button Tooltip —
void
— libNtve_gf_ResetUnitInfoButtonButtonTooltip - Reset Unit Info Button - Item Tooltip —
void
— libNtve_gf_ResetUnitInfoButtonItemTooltip - Set Unit Command Button Tooltip —
void
— UnitSetInfoButtonTooltip - Reset Unit Command Button Tooltip —
void
— UnitClearInfoButtonTooltip - Set Unit Highlight Cursor —
void
— UnitSetCursor - Set Unit Ping Cursor —
void
— UnitSetPingCursor - Set Unit Info —
void
— UnitSetInfoText - Set Unit Info Text —
void
— UnitSetInfoText2 - Set Unit Info Tip —
void
— UnitSetInfoTip - Set Unit Info SubTip —
void
— UnitSetInfoSubTip - Clear Unit Info —
void
— UnitClearInfoText - Set Unit Status Bar State (Deprecated) —
void
— UnitForceStatusBar - Show Unit Status Bar —
void
— UnitStatusBarOverride - Hide Unit Status Bar —
void
— UnitStatusBarClearOverride - Set Unit Scale —
void
— UnitSetScale - Set Unit Model Variation —
void
— libNtve_gf_UnitSetVariation - Change Unit Height —
void
— UnitSetHeight - Height Of Unit —
fixed
— UnitGetHeight - Change Unit Damage —
void
— libNtve_gf_ChangeUnitDamage - Add On Child —
unit
— UnitAddOnChild - Add On Parent —
unit
— UnitAddOnParent
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:849
UnitIssueOrder(gv_boss, OrderTargetingPoint(AbilityCommand("move", 0), lv_targetLoc), c_orderQueueReplace);
Wait(0.5, c_timeGame);
while (!((UnitTestState(gv_boss, c_unitStateIdle) == true))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1728
lv_target = PointWithOffset(lp_center, RandomFixed(-4.0, 4.0), RandomFixed(-1.5, 1.5));
UnitIssueOrder(lp_battlecruiser, OrderTargetingPoint(AbilityCommand("move", 0), lv_target), c_orderQueueReplace);
while (!(((UnitIsAlive(lp_battlecruiser) == false) || (UnitTestState(lp_battlecruiser, c_unitStateIdle) == true)))) {
Wait(1.0, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:2999
Wait(RandomFixed(4.0, 7.0), c_timeGame);
}
while (!((UnitTestState(lp_powerup, c_unitStateIdle) == true))) {
Wait(1.0, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:4909
gv_level1InterceptorCurrentIndex = -1;
gf_PrepareUnitForShooterGame(lv_interceptor);
while (!(((UnitIsAlive(lv_interceptor) == false) || (UnitTestState(lv_interceptor, c_unitStateIdle) == true)))) {
Wait(1.0, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:5316
}
TriggerExecute(gt_Level2BossLeviathanCharge, true, false);
while (!((UnitTestState(gv_boss, c_unitStateIdle) == true))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:5319
Wait(0.5, c_timeGame);
}
while (!((UnitTestState(gv_boss, c_unitStateIdle) == false))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:5322
Wait(0.5, c_timeGame);
}
while (!((UnitTestState(gv_boss, c_unitStateIdle) == true))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:6299
else {
}
if ((UnitTestState(lv_plane, c_unitStateIdle) == true)) {
break;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:6521
else {
}
if ((UnitTestState(lv_plane, c_unitStateIdle) == true)) {
break;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:6642
else {
}
if ((UnitTestState(lv_plane, c_unitStateIdle) == true)) {
break;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:2769
}
if ((UnitTestState(lv_scientist, c_unitStateIdle) == true)) {
libNtve_gf_TurnAnimationPropertiesOff(libNtve_gf_MainActorofUnit(lv_scientist), "Fast");
libNtve_gf_SendActorMessageToUnit(lv_scientist, "AnimBracketStart Scared Fidget,Inferior,Start Fidget,Inferior Fidget,Inferior,E");
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:8110
lv_current = DataTableGetInt(true, lv_datatable_name);
if ((gv_worldMode == ge_WorldMode_WorldModeGlobal) && (UnitTestState(gf_ActorUnit(lp_actor), c_unitStateIdle) == true) && (libNtve_gf_UnitIsHidden(gf_ActorUnit(lp_actor)) == false) && (gv_currentRoom == lp_room)) {
if ((lv_current <= 1)) {
lv_current += 1;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:8122
}
else {
if ((UnitTestState(gf_ActorUnit(lp_actor), c_unitStateIdle) == false) && (lv_current > 0)) {
lv_current = 0;
DataTableSetInt(true, lv_datatable_name, lv_current);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10845
// Implementation
if (((lp_actor == ge_ActorID_ActorNone) || (lp_actor == gv_currentGossipActor) || (UnitTestState(gf_ActorUnit(lp_actor), c_unitStateHighlightable) == false) || (gf_ActorWithFidget(lp_actor) == false))) {
return ;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:14734
lv_pbIndex = (lv_pb);
if (((UnitTestState(gv_pinboards[lv_pbIndex].lv_pinboard, c_unitStateHighlightable) == false) || (gv_pinboards[lv_pbIndex].lv_range == ge_PinboardCameraRange_Close))) {
return true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:14830
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:21778
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25576
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25620
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25664
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25710
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:1860
}
if (!((UnitTestState(EventUnitDamageSourceUnit(), c_unitStateCloaked) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03b.sc2map/MapScript.galaxy:4014
}
if (!((UnitTestState(gv_p3Raven, c_unitStateIdle) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:849
UnitIssueOrder(gv_boss, OrderTargetingPoint(AbilityCommand("move", 0), lv_targetLoc), c_orderQueueReplace);
Wait(0.5, c_timeGame);
while (!((UnitTestState(gv_boss, c_unitStateIdle) == true))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:1728
lv_target = PointWithOffset(lp_center, RandomFixed(-4.0, 4.0), RandomFixed(-1.5, 1.5));
UnitIssueOrder(lp_battlecruiser, OrderTargetingPoint(AbilityCommand("move", 0), lv_target), c_orderQueueReplace);
while (!(((UnitIsAlive(lp_battlecruiser) == false) || (UnitTestState(lp_battlecruiser, c_unitStateIdle) == true)))) {
Wait(1.0, c_timeGame);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:2999
Wait(RandomFixed(4.0, 7.0), c_timeGame);
}
while (!((UnitTestState(lp_powerup, c_unitStateIdle) == true))) {
Wait(1.0, c_timeGame);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:4909
gv_level1InterceptorCurrentIndex = -1;
gf_PrepareUnitForShooterGame(lv_interceptor);
while (!(((UnitIsAlive(lv_interceptor) == false) || (UnitTestState(lv_interceptor, c_unitStateIdle) == true)))) {
Wait(1.0, c_timeGame);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:5316
}
TriggerExecute(gt_Level2BossLeviathanCharge, true, false);
while (!((UnitTestState(gv_boss, c_unitStateIdle) == true))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:5319
Wait(0.5, c_timeGame);
}
while (!((UnitTestState(gv_boss, c_unitStateIdle) == false))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:5322
Wait(0.5, c_timeGame);
}
while (!((UnitTestState(gv_boss, c_unitStateIdle) == true))) {
Wait(0.5, c_timeGame);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:6299
else {
}
if ((UnitTestState(lv_plane, c_unitStateIdle) == true)) {
break;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:6521
else {
}
if ((UnitTestState(lv_plane, c_unitStateIdle) == true)) {
break;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:6642
else {
}
if ((UnitTestState(lv_plane, c_unitStateIdle) == true)) {
break;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2map — MapScript.galaxy:2769
}
if ((UnitTestState(lv_scientist, c_unitStateIdle) == true)) {
libNtve_gf_TurnAnimationPropertiesOff(libNtve_gf_MainActorofUnit(lv_scientist), "Fast");
libNtve_gf_SendActorMessageToUnit(lv_scientist, "AnimBracketStart Scared Fidget,Inferior,Start Fidget,Inferior Fidget,Inferior,E");
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:8110
lv_current = DataTableGetInt(true, lv_datatable_name);
if ((gv_worldMode == ge_WorldMode_WorldModeGlobal) && (UnitTestState(gf_ActorUnit(lp_actor), c_unitStateIdle) == true) && (libNtve_gf_UnitIsHidden(gf_ActorUnit(lp_actor)) == false) && (gv_currentRoom == lp_room)) {
if ((lv_current <= 1)) {
lv_current += 1;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:8122
}
else {
if ((UnitTestState(gf_ActorUnit(lp_actor), c_unitStateIdle) == false) && (lv_current > 0)) {
lv_current = 0;
DataTableSetInt(true, lv_datatable_name, lv_current);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:10845
// Implementation
if (((lp_actor == ge_ActorID_ActorNone) || (lp_actor == gv_currentGossipActor) || (UnitTestState(gf_ActorUnit(lp_actor), c_unitStateHighlightable) == false) || (gf_ActorWithFidget(lp_actor) == false))) {
return ;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:14734
lv_pbIndex = (lv_pb);
if (((UnitTestState(gv_pinboards[lv_pbIndex].lv_pinboard, c_unitStateHighlightable) == false) || (gv_pinboards[lv_pbIndex].lv_range == ge_PinboardCameraRange_Close))) {
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:14830
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:21778
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25576
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25620
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25664
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25710
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:1860
}
if (!((UnitTestState(EventUnitDamageSourceUnit(), c_unitStateCloaked) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2map — MapScript.galaxy:4014
}
if (!((UnitTestState(gv_p3Raven, c_unitStateIdle) == true))) {
return false;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zchar01.sc2map/MapScript.galaxy:521
Wait(0.5, c_timeAI);
lv_corruptionTime -= 0.5;
if (((gv_zagaraAlive == false) || (UnitHasBehavior(gv_zagara, "PsionicPulse") == true) || (UnitHasBehavior(gv_zagara, "PsiGrip") == true) || (UnitHasBehavior(gv_zagara, "PsiGripHeight") == true) || (UnitHasBehavior(gv_zagara, "PsionicLift") == true) || (UnitHasBehavior(gv_zagara, "PsionicLiftRaise") == true) || (UnitTestState(gv_zagara, c_unitStateStunned) == true))) {
if ((gv_eggsCollected >= 100)) {
UnitSelect(lp_eggToCorrupt, gv_pLAYER_01_USER, false);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zchar01.sc2map/MapScript.galaxy:2596
}
else {
if ((UnitGroupCount(gv_eggClusters[gv_zagaraPath[lv_currentEggCluster]].lv_eggs, c_unitCountAlive) >= 1) && (UnitGroupCount(UnitGroup(null, gv_pLAYER_01_USER, RegionCircle(UnitGetPosition(gv_zagara), 6.0), UnitFilter(0, 0, (1 << c_targetFilterMissile) | (1 << c_targetFilterBuried) | (1 << c_targetFilterCloaked), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) == 0) && (UnitHasBehavior(gv_zagara, "PsionicLift") == false) && (UnitHasBehavior(gv_zagara, "PsionicLiftRaise") == false) && (UnitTestState(gv_zagara, c_unitStateStunned) == false)) {
gf_CorruptEggwithZagara(libNtve_gf_ClosestUnitToPoint(UnitGetPosition(gv_zagara), gv_eggClusters[gv_zagaraPath[lv_currentEggCluster]].lv_eggs), lv_currentEggCluster);
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid02.sc2map/MapScript.galaxy:1106
}
if ((lv_actionSuggested == false) && (UnitTestState(lp_hybrid, c_unitStateIdle) == true) && (DistanceBetweenPoints(UnitGetPosition(lp_hybrid), gf_HybridHome(lv_indexHybrid)) > 8.0)) {
gv_aIHybridLeashing[lv_indexHybrid] = true;
libNtve_gf_AICast(lp_hybrid, OrderTargetingPoint(AbilityCommand("move", 0), gf_HybridHome(lv_indexHybrid)));
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zkorhal02.sc2map/MapScript.galaxy:3909
// Conditions
if (testConds) {
if (!((UnitTestState(gv_dEHAKA, c_unitStateIdle) == true))) {
return false;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zspace01.sc2map/MapScript.galaxy:604
lv_center = lp_targetCenter;
while (true) {
while (!(((UnitIsAlive(lp_fighter) == false) || ((UnitTestState(lp_fighter, c_unitStateIdle) == true) && (UnitOrderCount(lp_fighter) == 0))))) {
Wait(1.0, c_timeGame);
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zspace01.sc2map/MapScript.galaxy:4749
while (true) {
Wait(2.0, c_timeGame);
if (((gv_gameOver == true) || (UnitTestState(gv_enemyBase, c_unitStateIdle) == true) || (UnitIsAlive(gv_enemyBase) == false) || (UnitIsAlive(gv_hyperion) == false))) {
gv_mercSpaceStationActive = false;
return true;
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zspace01.sc2map/MapScript.galaxy:4819
Wait(5.0, c_timeGame);
while (true) {
if (((UnitIsAlive(EventUnit()) == false) || (UnitTestState(EventUnit(), c_unitStateIdle) == true))) {
UnitGroupRemove(gv_battlecruisersInCombat, EventUnit());
return true;
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus01.sc2map/MapScript.galaxy:579
lv_indexUnit = UnitGroupUnitFromEnd(autoEED44907_g, autoEED44907_u);
if (lv_indexUnit == null) { break; }
if ((UnitTestState(lv_indexUnit, c_unitStateIdle) == false)) {
return false;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus01.sc2map/MapScript.galaxy:736
}
if (((UnitTestState(lp_primal, c_unitStateIdle) == true) || (UnitOrder(lp_primal, 0) == OrderTargetingUnit(AbilityCommand("attack", 0), lp_critter)) || (UnitOrder(lp_primal, 0) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)) || (UnitOrder(lp_primal, 1) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)))) {
}
else {
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus01.sc2map/MapScript.galaxy:1756
else if ((gf_AIHarvesterIsAttackingMeat(lv_indexHarvester, 0) == true)) {
}
else if ((DistanceBetweenPoints(UnitGetPosition(lv_indexHarvester), UnitGetPosition(gv_corpse_PerCamp[lv_campIndex])) > 7.0) && (UnitTestState(lv_indexHarvester, c_unitStateIdle) == true)) {
UnitIssueOrder(lv_indexHarvester, OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(gv_corpse_PerCamp[lv_campIndex])), c_orderQueueReplace);
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus01.sc2map/MapScript.galaxy:4154
lv_indexQuillgor = UnitGroupUnitFromEnd(autoE22E342F_g, autoE22E342F_u);
if (lv_indexQuillgor == null) { break; }
if ((UnitTestState(lv_indexQuillgor, c_unitStateIdle) == true)) {
gf_LeashQuillgor(lv_indexQuillgor);
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:404
}
if (((UnitTestState(lp_primal, c_unitStateIdle) == true) || (UnitOrder(lp_primal, 0) == OrderTargetingUnit(AbilityCommand("attack", 0), lp_critter)) || (UnitOrder(lp_primal, 0) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)) || (UnitOrder(lp_primal, 1) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)))) {
}
else {
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus02.sc2map/MapScript.galaxy:3688
auto8C6F2799_var = UnitGroupUnitFromEnd(auto8C6F2799_g, auto8C6F2799_u);
if (auto8C6F2799_var == null) { break; }
if ((UnitTestState(auto8C6F2799_var, c_unitStateIdle) == true) && (UnitGroupHasUnit(gv_primalCritterAttackers, auto8C6F2799_var) == false) && (UnitCanAttackTarget(auto8C6F2799_var, lv_currentCritter) == true) && (libNtve_gf_UnitIsPaused(auto8C6F2799_var) == false) && ((UnitGetType(auto8C6F2799_var) == "PrimalZergling") || (UnitGetType(auto8C6F2799_var) == "PrimalHydralisk") || (UnitGetType(auto8C6F2799_var) == "PrimalRoach") || (UnitGetType(auto8C6F2799_var) == "PrimalUltralisk") || (UnitGetType(auto8C6F2799_var) == "PrimalFlyer") || (UnitGetType(auto8C6F2799_var) == "PrimalMutalisk") || (UnitGetType(auto8C6F2799_var) == "Ravasaur"))) {
UnitGroupAdd(lv_primalGroup, auto8C6F2799_var);
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus03.sc2map/MapScript.galaxy:517
}
}
if ((UnitTestState(lp_target, c_unitStateStunned) == true)) {
UnitSetState(lp_target, c_unitStateStunned, false);
UnitBehaviorRemove(lp_target, "GhostHoldFireB", 1);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus03.sc2map/MapScript.galaxy:680
}
if (((UnitTestState(lp_primal, c_unitStateIdle) == true) || (UnitOrder(lp_primal, 0) == OrderTargetingUnit(AbilityCommand("attack", 0), lp_critter)) || (UnitOrder(lp_primal, 0) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)) || (UnitOrder(lp_primal, 1) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)))) {
}
else {
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zzerus03.sc2map/MapScript.galaxy:2921
auto27257508_var = UnitGroupUnitFromEnd(auto27257508_g, auto27257508_u);
if (auto27257508_var == null) { break; }
if ((UnitTestState(auto27257508_var, c_unitStateIdle) == true) && (UnitGroupHasUnit(gv_primalCritterAttackers, auto27257508_var) == false) && (UnitCanAttackTarget(auto27257508_var, lv_currentCritter) == true) && (libNtve_gf_UnitIsPaused(auto27257508_var) == false) && ((UnitGetType(auto27257508_var) == "PrimalZergling") || (UnitGetType(auto27257508_var) == "PrimalHydralisk") || (UnitGetType(auto27257508_var) == "PrimalRoach") || (UnitGetType(auto27257508_var) == "PrimalUltralisk") || (UnitGetType(auto27257508_var) == "PrimalFlyer") || (UnitGetType(auto27257508_var) == "PrimalMutalisk") || (UnitGetType(auto27257508_var) == "Ravasaur"))) {
UnitGroupAdd(lv_primalGroup, auto27257508_var);
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar01.sc2map — MapScript.galaxy:521
Wait(0.5, c_timeAI);
lv_corruptionTime -= 0.5;
if (((gv_zagaraAlive == false) || (UnitHasBehavior(gv_zagara, "PsionicPulse") == true) || (UnitHasBehavior(gv_zagara, "PsiGrip") == true) || (UnitHasBehavior(gv_zagara, "PsiGripHeight") == true) || (UnitHasBehavior(gv_zagara, "PsionicLift") == true) || (UnitHasBehavior(gv_zagara, "PsionicLiftRaise") == true) || (UnitTestState(gv_zagara, c_unitStateStunned) == true))) {
if ((gv_eggsCollected >= 100)) {
UnitSelect(lp_eggToCorrupt, gv_pLAYER_01_USER, false);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar01.sc2map — MapScript.galaxy:2596
}
else {
if ((UnitGroupCount(gv_eggClusters[gv_zagaraPath[lv_currentEggCluster]].lv_eggs, c_unitCountAlive) >= 1) && (UnitGroupCount(UnitGroup(null, gv_pLAYER_01_USER, RegionCircle(UnitGetPosition(gv_zagara), 6.0), UnitFilter(0, 0, (1 << c_targetFilterMissile) | (1 << c_targetFilterBuried) | (1 << c_targetFilterCloaked), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) == 0) && (UnitHasBehavior(gv_zagara, "PsionicLift") == false) && (UnitHasBehavior(gv_zagara, "PsionicLiftRaise") == false) && (UnitTestState(gv_zagara, c_unitStateStunned) == false)) {
gf_CorruptEggwithZagara(libNtve_gf_ClosestUnitToPoint(UnitGetPosition(gv_zagara), gv_eggClusters[gv_zagaraPath[lv_currentEggCluster]].lv_eggs), lv_currentEggCluster);
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid02.sc2map — MapScript.galaxy:1106
}
if ((lv_actionSuggested == false) && (UnitTestState(lp_hybrid, c_unitStateIdle) == true) && (DistanceBetweenPoints(UnitGetPosition(lp_hybrid), gf_HybridHome(lv_indexHybrid)) > 8.0)) {
gv_aIHybridLeashing[lv_indexHybrid] = true;
libNtve_gf_AICast(lp_hybrid, OrderTargetingPoint(AbilityCommand("move", 0), gf_HybridHome(lv_indexHybrid)));
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal02.sc2map — MapScript.galaxy:3909
// Conditions
if (testConds) {
if (!((UnitTestState(gv_dEHAKA, c_unitStateIdle) == true))) {
return false;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace01.sc2map — MapScript.galaxy:604
lv_center = lp_targetCenter;
while (true) {
while (!(((UnitIsAlive(lp_fighter) == false) || ((UnitTestState(lp_fighter, c_unitStateIdle) == true) && (UnitOrderCount(lp_fighter) == 0))))) {
Wait(1.0, c_timeGame);
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace01.sc2map — MapScript.galaxy:4749
while (true) {
Wait(2.0, c_timeGame);
if (((gv_gameOver == true) || (UnitTestState(gv_enemyBase, c_unitStateIdle) == true) || (UnitIsAlive(gv_enemyBase) == false) || (UnitIsAlive(gv_hyperion) == false))) {
gv_mercSpaceStationActive = false;
return true;
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace01.sc2map — MapScript.galaxy:4819
Wait(5.0, c_timeGame);
while (true) {
if (((UnitIsAlive(EventUnit()) == false) || (UnitTestState(EventUnit(), c_unitStateIdle) == true))) {
UnitGroupRemove(gv_battlecruisersInCombat, EventUnit());
return true;
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus01.sc2map — MapScript.galaxy:579
lv_indexUnit = UnitGroupUnitFromEnd(autoEED44907_g, autoEED44907_u);
if (lv_indexUnit == null) { break; }
if ((UnitTestState(lv_indexUnit, c_unitStateIdle) == false)) {
return false;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus01.sc2map — MapScript.galaxy:736
}
if (((UnitTestState(lp_primal, c_unitStateIdle) == true) || (UnitOrder(lp_primal, 0) == OrderTargetingUnit(AbilityCommand("attack", 0), lp_critter)) || (UnitOrder(lp_primal, 0) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)) || (UnitOrder(lp_primal, 1) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)))) {
}
else {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus01.sc2map — MapScript.galaxy:1756
else if ((gf_AIHarvesterIsAttackingMeat(lv_indexHarvester, 0) == true)) {
}
else if ((DistanceBetweenPoints(UnitGetPosition(lv_indexHarvester), UnitGetPosition(gv_corpse_PerCamp[lv_campIndex])) > 7.0) && (UnitTestState(lv_indexHarvester, c_unitStateIdle) == true)) {
UnitIssueOrder(lv_indexHarvester, OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(gv_corpse_PerCamp[lv_campIndex])), c_orderQueueReplace);
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus01.sc2map — MapScript.galaxy:4154
lv_indexQuillgor = UnitGroupUnitFromEnd(autoE22E342F_g, autoE22E342F_u);
if (lv_indexQuillgor == null) { break; }
if ((UnitTestState(lv_indexQuillgor, c_unitStateIdle) == true)) {
gf_LeashQuillgor(lv_indexQuillgor);
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2map — MapScript.galaxy:404
}
if (((UnitTestState(lp_primal, c_unitStateIdle) == true) || (UnitOrder(lp_primal, 0) == OrderTargetingUnit(AbilityCommand("attack", 0), lp_critter)) || (UnitOrder(lp_primal, 0) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)) || (UnitOrder(lp_primal, 1) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)))) {
}
else {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus02.sc2map — MapScript.galaxy:3688
auto8C6F2799_var = UnitGroupUnitFromEnd(auto8C6F2799_g, auto8C6F2799_u);
if (auto8C6F2799_var == null) { break; }
if ((UnitTestState(auto8C6F2799_var, c_unitStateIdle) == true) && (UnitGroupHasUnit(gv_primalCritterAttackers, auto8C6F2799_var) == false) && (UnitCanAttackTarget(auto8C6F2799_var, lv_currentCritter) == true) && (libNtve_gf_UnitIsPaused(auto8C6F2799_var) == false) && ((UnitGetType(auto8C6F2799_var) == "PrimalZergling") || (UnitGetType(auto8C6F2799_var) == "PrimalHydralisk") || (UnitGetType(auto8C6F2799_var) == "PrimalRoach") || (UnitGetType(auto8C6F2799_var) == "PrimalUltralisk") || (UnitGetType(auto8C6F2799_var) == "PrimalFlyer") || (UnitGetType(auto8C6F2799_var) == "PrimalMutalisk") || (UnitGetType(auto8C6F2799_var) == "Ravasaur"))) {
UnitGroupAdd(lv_primalGroup, auto8C6F2799_var);
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus03.sc2map — MapScript.galaxy:517
}
}
if ((UnitTestState(lp_target, c_unitStateStunned) == true)) {
UnitSetState(lp_target, c_unitStateStunned, false);
UnitBehaviorRemove(lp_target, "GhostHoldFireB", 1);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus03.sc2map — MapScript.galaxy:680
}
if (((UnitTestState(lp_primal, c_unitStateIdle) == true) || (UnitOrder(lp_primal, 0) == OrderTargetingUnit(AbilityCommand("attack", 0), lp_critter)) || (UnitOrder(lp_primal, 0) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)) || (UnitOrder(lp_primal, 1) == OrderTargetingPoint(AbilityCommand("attack", 0), lv_idlePosition)))) {
}
else {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus03.sc2map — MapScript.galaxy:2921
auto27257508_var = UnitGroupUnitFromEnd(auto27257508_g, auto27257508_u);
if (auto27257508_var == null) { break; }
if ((UnitTestState(auto27257508_var, c_unitStateIdle) == true) && (UnitGroupHasUnit(gv_primalCritterAttackers, auto27257508_var) == false) && (UnitCanAttackTarget(auto27257508_var, lv_currentCritter) == true) && (libNtve_gf_UnitIsPaused(auto27257508_var) == false) && ((UnitGetType(auto27257508_var) == "PrimalZergling") || (UnitGetType(auto27257508_var) == "PrimalHydralisk") || (UnitGetType(auto27257508_var) == "PrimalRoach") || (UnitGetType(auto27257508_var) == "PrimalUltralisk") || (UnitGetType(auto27257508_var) == "PrimalFlyer") || (UnitGetType(auto27257508_var) == "PrimalMutalisk") || (UnitGetType(auto27257508_var) == "Ravasaur"))) {
UnitGroupAdd(lv_primalGroup, auto27257508_var);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:19977
// Conditions
if (testConds) {
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20077
}
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20139
}
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20205
}
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20343
}
while (!((UnitTestState(libSwaC_gv_zS_ArmyCustomEggRoomEvolutionMaster, c_unitStateHighlightable) == true) && (libSwaC_gv_zS_ArmyCustomCurrentUI == libSwaC_ge_ArmyUIScreen_EggRoom))) {
Wait(1.0, c_timeGame);
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20608
}
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20674
}
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20732
}
if (!((UnitTestState(EventUnit(), c_unitStateHighlightable) == true))) {
return false;
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/ppurifier01.sc2map/MapScript.galaxy:499
}
if ((UnitTestState(lp_unit, c_unitStateUnderConstruction) == false)) {
UnitSetFacing(lp_unit, lp_angle, 0.0625);
return true;
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/ppurifier01.sc2map — MapScript.galaxy:499
}
if ((UnitTestState(lp_unit, c_unitStateUnderConstruction) == false)) {
UnitSetFacing(lp_unit, lp_angle, 0.0625);
return true;
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5307
// Automatic Variable Declarations
// Implementation
return UnitTestState(lp_u, c_unitStatePaused);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5313
// Automatic Variable Declarations
// Implementation
return UnitTestState(lp_u, c_unitStateSleeping);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5319
// Automatic Variable Declarations
// Implementation
return UnitTestState(lp_u, c_unitStateHidden);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5377
// Automatic Variable Declarations
// Implementation
return UnitTestState(lp_u, c_unitStateInvulnerable);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5728
// Automatic Variable Declarations
// Implementation
return UnitTestState(lp_u, c_unitStateInsideTransport);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5734
// Automatic Variable Declarations
// Implementation
return UnitTestState(lp_u, c_unitStateInsideUnitTransport);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5740
// Automatic Variable Declarations
// Implementation
return UnitTestState(lp_u, c_unitStateInsidePlayerTransport);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5771
// Automatic Variable Declarations
// Implementation
return UnitTestState(lp_u, c_unitStateUnderConstruction);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1268
unitCount = unitCount - 1;
if (UnitTestState(unitToCheck, c_unitStateCloaked)) {
nearCloakedEnemy = true;
break;
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1328
}
if (!UnitTestState(unitToCheck, c_unitStateCloaked)) {
continue;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:793
//
if (!unload) {
if (UnitTestState(unitToCheck, c_unitStateInsideTransport)) {
continue;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:924
continue;
}
if (UnitTestState(unitToCheck, c_unitStateInsideTransport)) {
continue;
}