# Unit Is Alive

Grammaru is alive
FlagsNative | Function

Returns true if a unit is alive.

# Arguments

  • unit — Unit

Returns — bool

native bool UnitIsAlive(unit inUnit);

Category: Unit / Basic

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:840


    // Implementation
    if ((UnitIsAlive(gv_boss) == false)) {
        return ;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1098

    // Implementation
    while (true) {
        if ((UnitIsAlive(lp_guardian) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1551

    while (true) {
        Wait(lp_onTime, c_timeGame);
        if ((UnitIsAlive(lv_lightningProjector) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1558

        UnitIssueOrder(lv_lightningProjector, Order(AbilityCommand("SS_LightningProjectorToggle", 1)), c_orderQueueReplace);
        Wait(lp_offTime, c_timeGame);
        if ((UnitIsAlive(lv_lightningProjector) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1662

    // Implementation
    while (true) {
        if ((UnitIsAlive(lp_scienceVessel) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1716

    // Implementation
    while (true) {
        if ((UnitIsAlive(lp_battlecruiser) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.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.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1732

        }
        Wait(RandomFixed(1.0, 2.0), c_timeGame);
        if ((UnitIsAlive(lp_battlecruiser) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:1745

                Wait(2.0, c_timeGame);
            }
            if ((UnitIsAlive(lp_battlecruiser) == false)) {
                return true;
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:2345

void gf_TerraTronSpawnMissileSpinners () {
    // Implementation
    if ((UnitIsAlive(gv_missileSpinnerL) == true) && (UnitIsAlive(gv_missileSpinnerR) == true)) {
        return ;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:327

            UnitBehaviorAdd(UnitCargoLastCreated(), "Hustle", UnitCargoLastCreated(), 1);
            UnitSetState(UnitCargoLastCreated(), c_unitStateTargetable, true);
            if ((UnitIsAlive(gv_tHEONETRUCK) == true)) {
                UnitIssueOrder(lv_randomHut, OrderTargetingPoint(null, PointFromId(856)), c_orderQueueReplace);
                UnitIssueOrder(lv_randomHut, OrderTargetingUnit(null, gv_tHEONETRUCK), c_orderQueueAddToEnd);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:1019

    libNtve_gf_MakeUnitUncommandable(UnitFromId(290), true);
    UnitSetState(UnitFromId(290), c_unitStateTargetable, false);
    while (!(((UnitGroupCount(UnitCargoGroup(UnitFromId(290)), c_unitCountAlive) == 0) || (UnitIsAlive(UnitFromId(290)) == false)))) {
        Wait(1.0, c_timeGame);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:1335

    UnitIssueOrder(UnitFromId(2147), OrderTargetingUnit(AbilityCommand("attack", 0), UnitLastCreated()), c_orderQueueReplace);
    UnitGroupAdd(lv_unitgroup, UnitLastCreated());
    while (!(((libNtve_gf_UnitGroupIsDead(lv_unitgroup) == true) || (UnitIsAlive(UnitLastCreated()) == false)))) {
        Wait(0.5, c_timeGame);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:2439

    }

    if ((UnitIsAlive(gv_pingConvoy) == false)) {
        gv_pingConvoy = UnitGroupRandomUnit(gv_colonistsOnTheMove, c_unitCountAlive);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:3005

    for (auto9777FDD0_i = 1; auto9777FDD0_i <= auto9777FDD0_n; auto9777FDD0_i += 1) {
        Wait(1.0, c_timeGame);
        if ((UnitIsAlive(gv_chrysalisPingUnit) == false)) {
            break;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson01.sc2map/MapScript.galaxy:3634

        autoC7919796_n = lv_packs;
        for (autoC7919796_i = 1; autoC7919796_i <= autoC7919796_n; autoC7919796_i += 1) {
            if ((UnitIsAlive(lv_nydusWorm) == true) && (UnitGroupHasUnit(gv_activeNydusWorms, lv_nydusWorm) == true)) {
                libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_nydusWorm), c_animNameDefault, "Spell", 0, c_animTimeDefault);
                libNtve_gf_CreateUnitsAtPoint2(lv_packSize, lv_type, 0, gv_p2_ZERG_ORANGE_NW, UnitGetPosition(lv_nydusWorm));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:316

    }

    if ((UnitIsAlive(lp_u) == false)) {
        lv_msg = (lv_msg + StringExternal("Param/Value/E8BFA0C9"));
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:331

    }

    if ((UnitIsAlive(lp_attackedStructure) == true)) {
        UnitSetCustomValue(lp_attackedStructure, 0, gv_nightDefenderCooldown);
        gv_nightDefenderPingUnit = lp_attackedStructure;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:406

    }
    else if (autoEA1974A1_val == ge_AttackDirection_SouthLeftfallback) {
        if ((UnitIsAlive(UnitFromId(17)) == false)) {
            gf_PrepareAttackDirection(ge_AttackDirection_South);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:414

    }
    else if (autoEA1974A1_val == ge_AttackDirection_SouthRightfallback) {
        if ((UnitIsAlive(UnitFromId(17)) == false)) {
            gf_PrepareAttackDirection(ge_AttackDirection_South);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:2010

        }
        else {
            if ((gv_timeOfDay == ge_PRESET_TimeOfDay_Night) && (UnitIsAlive(gv_infestableStructure[lv_index]) == true) && (UnitGetPropertyFixed(gv_infestableStructure[lv_index], c_unitPropLife, c_unitPropCurrent) < gv_infestableStructureHealth[lv_index])) {
                gf_NightDefenderSpawn(gv_infestableStructure[lv_index]);
                if ((gv_nightReactionThrottle == false)) {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:2792


    TriggerEnable(TriggerGetCurrent(), false);
    if ((UnitIsAlive(UnitFromId(17)) == true)) {
        Wait((gv_nIGHT_DURATION - 60.0), c_timeGame);
        while (!((gv_inCinematic == false))) {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1281

    gv_purifierProgressCounter = 1;
    Wait(3.0, c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1289

    UnitIssueOrder(gv_purifier, Order(AbilityCommand("PurifierTogglePower", 0)), c_orderQueueAddToEnd);
    Wait(5.0, c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1301

    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03AHorner00003", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));
    Wait((gv_pOWER_UP_TIME - lv_aLERT_WAIT_TIME), c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1307

    TriggerExecute(gt_TransmissionPurifierAboutToFire, true, false);
    Wait(lv_aLERT_WAIT_TIME, c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1318

    VisRevealerEnable(gv_colonist_Outpost_Alpha, false);
    Wait(10.0, c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1327

    libNtve_gf_CreateUnitsWithDefaultFacing(1, "Blocker6x6", c_unitCreateIgnorePlacement, 0, PointFromId(877));
    Wait(10.0, c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1381

    gv_purifierProgressCounter = 2;
    Wait(3.0, c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1389

    UnitIssueOrder(gv_purifier, Order(AbilityCommand("PurifierTogglePower", 0)), c_orderQueueAddToEnd);
    Wait(5.0, c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1401

    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03AHanson00009", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));
    Wait((gv_pOWER_UP_TIME - lv_aLERT_WAIT_TIME), c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1428

    }
    Wait(10.0, c_timeGame);
    if ((UnitIsAlive(gv_purifier) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:455


    // Implementation
    if ((UnitIsAlive(UnitFromId(57)) == false)) {
        lv_timeReduction += 60.0;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:459

    }

    if ((UnitIsAlive(UnitFromId(68)) == false)) {
        lv_timeReduction += 60.0;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:463

    }

    if ((UnitIsAlive(UnitFromId(5)) == false)) {
        lv_timeReduction += 60.0;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:588

    // Implementation
    lv_defenderType = gv_infestationDefenderType[lp_colonyIndex][lp_defenderIndex];
    if ((gv_infestationDefenderUnit[lp_colonyIndex][lp_defenderIndex] != null) && (UnitIsAlive(gv_infestationDefenderUnit[lp_colonyIndex][lp_defenderIndex]) == true)) {
        return ;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:635

        lv_drone = UnitCargoLastCreated();
        gf_DropCargoAndWait(lv_overlord, lv_drone, 2.0);
        if ((UnitIsAlive(lv_drone) == true)) {
            gf_BuildVirophageAndWait(lv_drone, lp_colonyIndex, 10.0);
            if ((gv_infestationVirophageUnit[lp_colonyIndex] != null)) {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:660

    UnitIssueOrder(lp_transport, Order(AbilityCommand("move", 2)), c_orderQueueAddToEnd);
    while (true) {
        if (((UnitIsAlive(lp_cargo) == false) || (libNtve_gf_UnitIsInsideTransport(lp_cargo) == false) || (TimerGetRemaining(lv_timeoutTimer) <= 0.0))) {
            return ;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:680

    UnitIssueOrder(lp_drone, OrderTargetingPoint(AbilityCommand("ZergBuild", 16), gv_infestationVirophageSpot[lp_colonyIndex]), c_orderQueueAddToEnd);
    while (true) {
        if (((UnitIsAlive(lp_drone) == false) || (gv_infestationVirophageUnit[lp_colonyIndex] != null) || (TimerGetRemaining(lv_timeoutTimer) <= 0.0))) {
            return ;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:784

        autoEA209D47_n = gv_eggData[(lp_type)].lv_spawnQty;
        for (autoEA209D47_i = 1; autoEA209D47_i <= autoEA209D47_n; autoEA209D47_i += 1) {
            if ((gf_InfestedPlayerisFoodCapped() == false) && (lv_virophage != null) && (UnitIsAlive(lv_virophage) == true) && (UnitGetType(lv_virophage) == "Virophage")) {
                gf_EggSpawnerSpawnAnEgg(lp_type, RegionRandomPoint(RegionCircle(RegionGetCenter(gv_infestationRegion[lv_colonyIndex]), lv_sPAWN_RADIUS)), lv_colonyIndex);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:2184

    for ( ; ( (auto3181AD42_ai >= 0 && lv_colonyIndex <= auto3181AD42_ae) || (auto3181AD42_ai < 0 && lv_colonyIndex >= auto3181AD42_ae) ) ; lv_colonyIndex += auto3181AD42_ai ) {
        lv_virophage = gv_infestationVirophageUnit[lv_colonyIndex];
        if ((lv_virophage != null) && (UnitIsAlive(lv_virophage) == true) && (UnitGetType(lv_virophage) == "Virophage") && (UnitGroupCount(UnitGroup("Feederling", gv_p07_ZERG_INFESTED, gv_infestationRegion[lv_colonyIndex], UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), lv_fEEDERLINGS), c_unitCountAlive) < lv_fEEDERLINGS) && (UnitGroupCount(UnitGroup(null, gv_p01_USER, gv_infestationRegion[lv_colonyIndex], UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) == 0)) {
            UnitCreate(1, "Feederling", 0, gv_p07_ZERG_INFESTED, UnitGetPosition(lv_virophage), 270.0);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:2288

    lv_colonyIndex = 1;
    for ( ; ( (autoDCB4570F_ai >= 0 && lv_colonyIndex <= autoDCB4570F_ae) || (autoDCB4570F_ai < 0 && lv_colonyIndex >= autoDCB4570F_ae) ) ; lv_colonyIndex += autoDCB4570F_ai ) {
        if ((UnitIsAlive(gv_infestationVirophageUnit[lv_colonyIndex]) == true)) {
            lv_victim = UnitGroupRandomUnit(UnitGroup(null, c_playerAny, gv_infestationRegion[lv_colonyIndex], UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive);
            if ((lv_victim != null)) {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:426

    // Automatic Variable Declarations
    // Implementation
    if (((UnitIsAlive(lp_diamondback) == false) || (UnitGetOwner(lp_diamondback) != gv_pLAYER_05_ABANDONEDVEHICLES))) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:436

    PingSetScale(PingLastCreated(), 0.75);
    PingSetTooltip(PingLastCreated(), StringExternal("Param/Value/EC45B863"));
    while (!(((UnitIsAlive(lp_diamondback) == false) || (UnitGetOwner(lp_diamondback) != gv_pLAYER_05_ABANDONEDVEHICLES)))) {
        Wait(1.0, c_timeGame);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:1886

        lv_i = 1;
        for ( ; ( (auto49FA79E9_ai >= 0 && lv_i <= auto49FA79E9_ae) || (auto49FA79E9_ai < 0 && lv_i >= auto49FA79E9_ae) ) ; lv_i += auto49FA79E9_ai ) {
            if ((gv_trainList[lv_trainsToSpawn[lv_i]].lv_numberOfCars >= lv_currentCar) && ((lv_currentCar == 1) || (UnitIsAlive(gv_trainList[lv_trainsToSpawn[lv_i]].lv_trainCars[1]) == true))) {
                lv_carsRemain = true;
                autoFCB05D1E_val = gv_trainList[lv_trainsToSpawn[lv_i]].lv_tunnel;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:2071

            UnitIssueOrder(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort, OrderTargetingPoint(AbilityCommand("attack", 0), PointWithOffsetPolar(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_waitPosition, gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarRadius, (PointGetFacing(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_waitPosition) + gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarAngle))), c_orderQueueReplace);
        }
        if ((UnitIsAlive(gv_trainList[lv_trainIndex].lv_trainCars[1]) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:2085

            lv_i = 1;
            for ( ; ( (auto0F8EF654_ai >= 0 && lv_i <= auto0F8EF654_ae) || (auto0F8EF654_ai < 0 && lv_i >= auto0F8EF654_ae) ) ; lv_i += auto0F8EF654_ai ) {
                if ((UnitIsAlive(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort) == true)) {
                    AISetUnitScriptControlled(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort, false);
                    AIAttackWaveAddEscortUnit(lv_escortPlayer, gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort, gv_trainList[lv_trainIndex].lv_trainCars[gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escortCar], gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarRadius, gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarAngle);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:2216

        }

        if ((UnitIsAlive(gv_trainList[gv_trainBossBarIndex].lv_trainCars[1]) == true) && (gv_inCinematic == false)) {
            libNtve_gf_ShowHideBossBar(true, 1);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:2433

        }
        gv_trainList[lv_trainIndex].lv_lastCar -= 1;
        if ((UnitIsAlive(gv_trainList[gv_trainBossBarIndex].lv_trainCars[1]) == false)) {
            gv_trainList[lv_trainIndex].lv_trainAlive = false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:2438


        if ((lv_trainIndex == gv_trainBossBarIndex)) {
            if ((UnitIsAlive(gv_trainList[gv_trainBossBarIndex].lv_trainCars[1]) == true)) {
                libNtve_gf_SetBossBarBoss(1, gv_trainList[gv_trainBossBarIndex].lv_trainCars[1], true);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:2515

    lv_i = 1;
    for ( ; ( (auto806C41E4_ai >= 0 && lv_i <= auto806C41E4_ae) || (auto806C41E4_ai < 0 && lv_i >= auto806C41E4_ae) ) ; lv_i += auto806C41E4_ai ) {
        if ((UnitIsAlive(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort) == true)) {
            UnitGroupAdd(lv_escortGroup, gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort);
            if ((ModF(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarAngle, 360.0) >= 20.0) && (ModF(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_polarAngle, 360.0) <= 160.0)) {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:2531


    }
    while (!((UnitIsAlive(gv_trainList[lv_trainIndex].lv_trainCars[1]) == false))) {
        Wait(1.0, c_timeAI);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner02.sc2map/MapScript.galaxy:356

    // Automatic Variable Declarations
    // Implementation
    if ((UnitIsAlive(UnitFromId(1226)) == true)) {
        UnitMagazineArm(gv_ghostNukeSilo, AbilityCommand("ArmSiloWithNuke", 0), 1);
        UnitIssueOrder(lp_nuker, Order(AbilityCommand("GhostCloak", 0)), c_orderQueueReplace);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner02.sc2map/MapScript.galaxy:3538

        }

        if (!((UnitIsAlive(UnitFromId(1226)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner02.sc2map/MapScript.galaxy:3751


    TriggerEnable(TriggerGetCurrent(), false);
    if ((UnitIsAlive(UnitFromId(327)) == true)) {
        UIAlertPoint("Trigger", gv_p01_USER, StringExternal("Param/Value/6AF13D92"), null, UnitGetPosition(UnitFromId(327)));
        libNtve_gf_CreateModelAtPoint("BriefingUnitSelect", UnitGetPosition(UnitFromId(327)));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:1294

        }

        if (!((UnitIsAlive(gv_odin) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:1592

    // Conditions
    if (testConds) {
        if (!((UnitIsAlive(gv_battlecruiser1) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:1596

        }

        if (!((UnitIsAlive(gv_battlecruiser2) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:1784


    TimerStart(lv_timeout, 6.0, false, c_timeGame);
    while (!(((TimerGetRemaining(lv_timeout) <= 0.0) || (UnitIsAlive(gv_tippedDetectorUnit) == false)))) {
        Wait(0.25, c_timeGame);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:2710

    TriggerExecute(gt_TransmissionTychusTakesBreakAfterP05BaseQ, true, false);
    libNtve_gf_ShareVisionofUnit(UnitFromId(503), true, gv_p06_DOMINION_STARPORT_A);
    if ((UnitIsAlive(UnitFromId(503)) == true)) {
        AIAttackWaveSetTargetUnit(gv_p06_DOMINION_STARPORT_A, UnitFromId(503));
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:2718

    AIAttackWaveAddUnits4(4, 4, 6, 8, "Marine");
    AIAttackWaveAddUnits4(3, 3, 3, 3, "Marauder");
    if ((UnitIsAlive(UnitFromId(503)) == true)) {
        AIAttackWaveSend(gv_p06_DOMINION_STARPORT_A, 10, false);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:3142

            UnitIssueOrder(UnitFromId(2219), OrderTargetingUnit(AbilityCommand("attack", 0), UnitFromId(2)), c_orderQueueAddToEnd);
        }
        if ((UnitIsAlive(UnitFromId(2219)) == true)) {
            TriggerExecute(gt_TransmissionYamatoTheOdinQQ, true, false);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:3235

        UnitIssueOrder(UnitFromId(2), Order(AbilityCommand("move", 2)), c_orderQueueAddToEnd);
        Wait(1.0, c_timeAI);
        if ((gv_gameOver == false) && (UnitIsAlive(gv_odin) == false)) {
            break;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:357

    // Automatic Variable Declarations
    // Implementation
    if ((UnitIsAlive(lp_transport) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:2110

        }

        if (!((UnitIsAlive(gv_odin) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:2930

        }

        if (!((UnitIsAlive(UnitFromId(1078)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:2982

        }

        if (!((UnitIsAlive(UnitFromId(191)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:3033

        }

        if (!((UnitIsAlive(UnitFromId(1370)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:3084

        }

        if (!((UnitIsAlive(UnitFromId(242)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:3135

        }

        if (!((UnitIsAlive(UnitFromId(1364)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:3186

        }

        if (!((UnitIsAlive(UnitFromId(926)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:4569

    TriggerEnable(TriggerGetCurrent(), false);
    gv_gameOver = true;
    if ((UnitIsAlive(gv_odin) == true)) {
        libNtve_gf_MakeUnitInvulnerable(gv_odin, true);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:4592

    }

    if ((UnitIsAlive(gv_odin) == true)) {
        gv_odinKillCount = libNtve_gf_UnitGetPropertyKills(gv_odin, c_unitPropCurrent);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:2765

    while (true) {
        Wait(0.5, c_timeGame);
        if ((UnitIsAlive(lv_scientist) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3708

    // Conditions
    if (testConds) {
        if (!((UnitIsAlive(gv_turret01) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3712

        }

        if (!((UnitIsAlive(gv_turret02) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3716

        }

        if (!((UnitIsAlive(gv_turret03) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3720

        }

        if (!((UnitIsAlive(gv_turret04) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3724

        }

        if (!((UnitIsAlive(gv_turret05) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3728

        }

        if (!((UnitIsAlive(gv_turret06) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3758

    // Conditions
    if (testConds) {
        if (!((UnitIsAlive(gv_turret01) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3762

        }

        if (!((UnitIsAlive(gv_turret02) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:3766

        }

        if (!((UnitIsAlive(gv_turret03) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:810

        }

        if (!((UnitIsAlive(gv_dogmeat) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:863

        }

        if (!((UnitIsAlive(gv_dogmeat) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:916

        }

        if (!((UnitIsAlive(gv_dogmeat) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:1000

    }

    if ((UnitIsAlive(gv_crazyOldClarice) == true)) {
        UnitIssueOrder(gv_crazyOldClarice, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(899)), c_orderQueueReplace);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:1034


    UnitRemove(EventUnit());
    if ((UnitIsAlive(gv_dogmeat) == true)) {
        SoundPlayOnUnit(SoundLink("Dog_Howl", -1), PlayerGroupAll(), gv_dogmeat, 0.0, 100.0, 0.0);
        UnitBehaviorAdd(gv_dogmeat, "CritterWanderLeashShort", gv_dogmeat, 1);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:1136


    TriggerQueueEnter();
    if ((UnitIsAlive(UnitFromId(59)) == false)) {
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:1904

    UIAlertUnit("Trigger", gv_p1_USER, StringExternal("Param/Value/A3BF4F95"), null, lv_speaker);
    TriggerQueueEnter();
    if ((UnitIsAlive(lv_speaker) == true)) {
        libCamp_gf_SetAllSoundChannelVolumesCampaign(libNtve_ge_VolumeChannelMode_Speech);
        libLbty_gf_PlayTransmissionCueSound(PlayerGroupAll());

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:2077

    gv_southieSpeaker = UnitGroupRandomUnit(lv_mARINES, c_unitCountAlive);
    TriggerQueueEnter();
    if ((UnitIsAlive(gv_southieSpeaker) == true)) {
        libCamp_gf_SetAllSoundChannelVolumesCampaign(libNtve_ge_VolumeChannelMode_Speech);
        libLbty_gf_PlayTransmissionCueSound(PlayerGroupAll());

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:2299

        }

        if (!((UnitIsAlive(UnitFromId(331)) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor01.sc2map/MapScript.galaxy:2656

    }
    if ((gv_escapeCivillansFinalOrderIssued == false)) {
        if ((UnitIsAlive(gv_holoboards[6]) == true)) {
            UnitGroupIssueOrder(gv_escapeCivilians, OrderTargetingUnit(AbilityCommand("attack", 0), gv_holoboards[6]), c_orderQueueAddToEnd);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor02.sc2map/MapScript.galaxy:314

    // Automatic Variable Declarations
    // Implementation
    if ((UnitIsAlive(lp_unit) == true)) {
        gv_dominionGuardsSize += 1;
        gv_dominionGuards[gv_dominionGuardsSize].lv_unit = lp_unit;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor02.sc2map/MapScript.galaxy:327

    // Implementation
    AIAttackWaveSetGatherPoint(gv_pLAYER_02_DOMINION, PointFromId(292));
    if ((UnitIsAlive(gv_medicBarracks) == true) && (UnitGetOwner(gv_medicBarracks) == gv_pLAYER_01_USER)) {
        AIAttackWaveSetTargetPoint(gv_pLAYER_02_DOMINION, UnitGetPosition(gv_medicBarracks));
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor02.sc2map/MapScript.galaxy:2094

    while (true) {
        Wait(1.0, c_timeGame);
        if ((UnitIsAlive(lv_colonist) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor02.sc2map/MapScript.galaxy:2103

        if ((UnitGroupCount(UnitGroup(null, gv_pLAYER_01_USER, RegionCircle(UnitGetPosition(lv_colonist), 5.0), UnitFilter(0, 0, (1 << c_targetFilterAir) | (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile) | (1 << c_targetFilterCloaked), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) > 0) && (ObjectiveGetState(gv_objectiveRebels) == c_objectiveStateCompleted)) {
            TriggerQueueEnter();
            if ((UnitIsAlive(lv_colonist) == true) && (gv_gameOver == false)) {
                libNtve_gf_AttachModelToUnit(lv_colonist, "TalkIcon", "Ref_Origin");
                lv_talkIcon = libNtve_gf_ActorLastCreated();

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor02.sc2map/MapScript.galaxy:2150

    while (true) {
        Wait(1.0, c_timeGame);
        if ((UnitIsAlive(lv_colonist) == false)) {
            return true;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor02.sc2map/MapScript.galaxy:2159

        if ((UnitGroupCount(UnitGroup(null, gv_pLAYER_01_USER, RegionCircle(UnitGetPosition(lv_colonist), 5.0), UnitFilter(0, 0, (1 << c_targetFilterAir) | (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile) | (1 << c_targetFilterCloaked), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) > 0) && (ObjectiveGetState(gv_objectiveRebels) == c_objectiveStateCompleted)) {
            TriggerQueueEnter();
            if ((UnitIsAlive(lv_colonist) == true) && (gv_gameOver == false)) {
                libNtve_gf_AttachModelToUnit(lv_colonist, "TalkIcon", "Ref_Origin");
                lv_talkIcon = libNtve_gf_ActorLastCreated();

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor02.sc2map/MapScript.galaxy:2206

    while (true) {
        Wait(1.0, c_timeGame);
        if ((UnitIsAlive(lv_colonist) == false)) {
            return true;
        }