# Unit In Region

Grammaru is in regioin|Region
FlagsFunction

Returns true if a unit is in the specified region.

# Arguments

  • unit — Unit
  • region — Region

Returns — bool

bool libNtve_gf_UnitInRegion(unit lp_u, region lp_regioin);

Category: Unit / Basic

# Examples

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

    for (autoBF15FEA3_i = 1; autoBF15FEA3_i <= autoBF15FEA3_n; autoBF15FEA3_i += 1) {
        Wait(0.125, c_timeGame);
        if ((libNtve_gf_UnitInRegion(gv_viking, lv_damageRegion) == true)) {
            UnitKill(gv_viking);
        }

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

            lv_overlord = UnitGroupUnitFromEnd(auto6DAA3909_g, auto6DAA3909_u);
            if (lv_overlord == null) { break; }
            if ((UnitGetOwner(lv_overlord) == gv_p07_ZERG_INFESTED) && (libNtve_gf_UnitInRegion(lv_overlord, gv_infestationRegion[lp_colonyIndex]) == true) && (lv_defenderIndex < gv_infestationDefenderCount[lp_colonyIndex])) {
                lv_defenderIndex += 1;
                gf_CreateADefender(lv_overlord, lp_colonyIndex, lv_defenderIndex);

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

    lv_colonyIndex = 1;
    for ( ; ( (autoF2EBF780_ai >= 0 && lv_colonyIndex <= autoF2EBF780_ae) || (autoF2EBF780_ai < 0 && lv_colonyIndex >= autoF2EBF780_ae) ) ; lv_colonyIndex += autoF2EBF780_ai ) {
        if ((libNtve_gf_UnitInRegion(EventUnit(), gv_infestationRegion[lv_colonyIndex]) == true)) {
            auto16B5685B_g = UnitGroup("Colonist", c_playerAny, gv_infestationRegion[lv_colonyIndex], UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
            auto16B5685B_u = UnitGroupCount(auto16B5685B_g, c_unitCountAll);

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

        for ( ; ( (autoDBBC6A4F_ai >= 0 && lv_i <= autoDBBC6A4F_ae) || (autoDBBC6A4F_ai < 0 && lv_i >= autoDBBC6A4F_ae) ) ; lv_i += autoDBBC6A4F_ai ) {
            if ((UnitIsAlive(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort) == true)) {
                if ((libNtve_gf_UnitInRegion(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort, RegionCircle(lv_exitPoint, 1.0)) == true)) {
                    UnitRemove(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort);
                }

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

        }

        if (!(((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(1)) == true) || (libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(6)) == true)))) {
            return false;
        }

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

        }

        if (!(((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(1)) == true) || (libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(6)) == true)))) {
            return false;
        }

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

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), gv_respawnableSalvage) == true))) {
            return false;
        }

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

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(10)) == true))) {
            return false;
        }

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

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(11)) == true))) {
            return false;
        }

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

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(12)) == true))) {
            return false;
        }

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

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(26)) == true))) {
            return false;
        }

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

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(27)) == true))) {
            return false;
        }

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

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(153)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/traynor03.sc2map/MapScript.galaxy:1407

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(56)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh01.sc2map/MapScript.galaxy:2219

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(18)) == true))) {
            return false;
        }

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

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(46)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:1953

        }

        if (!((libNtve_gf_UnitInRegion(gv_tosh, RegionFromId(28)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:2253


        lv_tempUnit = UnitGroupUnit(lv_patrolGroup, 1);
        if ((lv_targetCooldown == 0) && (libNtve_gf_UnitInRegion(lv_tempUnit, RegionCircle(PointWithOffsetPolar(PointFromId(1140), UnitGetCustomValue(lv_tempUnit, 0), UnitGetCustomValue(lv_tempUnit, 1)), 1.0)) == true)) {
            lv_movementTarget = PointFromId(1142);
            lv_targetCooldown = 10;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:2258

        }

        if ((lv_targetCooldown == 0) && (libNtve_gf_UnitInRegion(lv_tempUnit, RegionCircle(PointWithOffsetPolar(PointFromId(1142), UnitGetCustomValue(lv_tempUnit, 0), UnitGetCustomValue(lv_tempUnit, 1)), 1.0)) == true)) {
            lv_movementTarget = PointFromId(1140);
            lv_targetCooldown = 10;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:2263

        }

        if ((UnitIsAlive(gv_tosh) == true) && (libNtve_gf_UnitIsVisibleToPlayer(gv_tosh, gv_p6_DOMINION_ORANGE) == true) && (libNtve_gf_UnitInRegion(gv_tosh, RegionCircle(libNtve_gf_CenterOfUnitGroup(lv_patrolGroup), 9.0)) == true)) {
            UnitGroupIssueOrder(lv_patrolGroup, OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(gv_tosh)), c_orderQueueReplace);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:2416

            auto67BD9FEE_var = UnitGroupUnitFromEnd(auto67BD9FEE_g, auto67BD9FEE_u);
            if (auto67BD9FEE_var == null) { break; }
            if ((libNtve_gf_UnitInRegion(auto67BD9FEE_var, RegionCircle(Point(UnitGetCustomValue(auto67BD9FEE_var, 0), UnitGetCustomValue(auto67BD9FEE_var, 1)), 2.0)) == true)) {
                if ((RandomInt(1, 40) == 1)) {
                    lv_randomPoint = RegionRandomPoint(RegionFromId(45));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:2663

            auto0F10452F_var = UnitGroupUnitFromEnd(auto0F10452F_g, auto0F10452F_u);
            if (auto0F10452F_var == null) { break; }
            if ((libNtve_gf_UnitInRegion(auto0F10452F_var, RegionCircle(Point(UnitGetCustomValue(auto0F10452F_var, 0), UnitGetCustomValue(auto0F10452F_var, 1)), 2.0)) == true)) {
                if ((RandomInt(1, 32) == 1)) {
                    lv_randomPoint = RegionRandomPoint(RegionFromId(47));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:2750

        if (lv_driver == null) { break; }
        if ((UnitOrder(lv_driver, 0) == null)) {
            if ((libNtve_gf_UnitInRegion(lv_driver, RegionFromId(13)) == true)) {
                lv_targetDiamondback = libNtve_gf_ClosestUnitToPoint(UnitGetPosition(lv_driver), gv_nonActivatedDiamondbacks);
                UnitGroupRemove(gv_nonActivatedDiamondbacks, lv_targetDiamondback);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:2757

            }

            if ((libNtve_gf_UnitInRegion(lv_driver, RegionFromId(43)) == true)) {
                gv_firstDiamondbacksActivated += 1;
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:2761

            }

            if ((libNtve_gf_UnitInRegion(lv_driver, RegionFromId(44)) == true)) {
                gv_firstSiegeTanksActivated += 1;
            }

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

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(gv_p2Raven, RegionFromId(50)) != true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus01.sc2map/MapScript.galaxy:2108

        Wait(2.0, c_timeGame);
        libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionFromId(66), "ArtifactShrine", c_animNameDefault, "Stand B", c_animFlagPlayForever, c_animTimeDefault);
        while (!((libNtve_gf_UnitInRegion(lv_victoryUnit, RegionCircle(UnitGetPosition(gv_artifact), 2.0)) == true))) {
            Wait(1.0, c_timeGame);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus01.sc2map/MapScript.galaxy:5094

    // Transmission - SoundLink("TTychus01Swann00011", 0)
    libCamp_gf_SendTransmissionCampaign(null, SoundLink("TTychus01Swann00011", -1), c_transmissionDurationAdd, 0.0, true);
    while (!((libNtve_gf_UnitInRegion(lv_victoryDropship, RegionCircle(UnitGetPosition(gv_artifact), 2.0)) == true))) {
        Wait(1.0, c_timeGame);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:3721

        autoF58A53C8_var = UnitGroupUnitFromEnd(autoF58A53C8_g, autoF58A53C8_u);
        if (autoF58A53C8_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(autoF58A53C8_var, RegionFromId(6)) == false)) {
            UnitGroupRemove(lv_localUnits, autoF58A53C8_var);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:3800

        autoB08D0E56_var = UnitGroupUnitFromEnd(autoB08D0E56_g, autoB08D0E56_u);
        if (autoB08D0E56_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(autoB08D0E56_var, RegionFromId(6)) == false)) {
            UnitGroupRemove(lv_localUnits, autoB08D0E56_var);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:2513

            auto1C94DF8F_var = UnitGroupUnitFromEnd(auto1C94DF8F_g, auto1C94DF8F_u);
            if (auto1C94DF8F_var == null) { break; }
            if ((libNtve_gf_UnitInRegion(auto1C94DF8F_var, gv_kerrigansTarget) == true)) {
                lv_tARGETunit = auto1C94DF8F_var;
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:2608

    }

    if ((gv_fLAGKerrigansearching == true) && (libNtve_gf_UnitInRegion(EventUnit(), gv_kerrigansTarget) == true)) {
        TriggerDebugOutput(1, StringExternal("Param/Value/9F0B2A76"), false);
        UnitBehaviorRemove(gv_uNIT_KERRIGAN, "ProgressBar", 1);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:4420

    lv_pathIndex = 1;
    for ( ; ( (autoE23FE336_ai >= 0 && lv_pathIndex <= autoE23FE336_ae) || (autoE23FE336_ai < 0 && lv_pathIndex >= autoE23FE336_ae) ) ; lv_pathIndex += autoE23FE336_ai ) {
        if ((libNtve_gf_UnitInRegion(gv_uNIT_KERRIGAN, RegionCircle(gv_sitePath1[lv_pathIndex], 4.0)) == true)) {
            gv_sitePath1[lv_pathIndex] = null;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:4455

    lv_pathIndex = 1;
    for ( ; ( (autoD14FAD6E_ai >= 0 && lv_pathIndex <= autoD14FAD6E_ae) || (autoD14FAD6E_ai < 0 && lv_pathIndex >= autoD14FAD6E_ae) ) ; lv_pathIndex += autoD14FAD6E_ai ) {
        if ((libNtve_gf_UnitInRegion(gv_uNIT_KERRIGAN, RegionCircle(gv_sitePath2[lv_pathIndex], 4.0)) == true)) {
            gv_sitePath2[lv_pathIndex] = null;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:4490

    lv_pathIndex = 1;
    for ( ; ( (auto1ADBC203_ai >= 0 && lv_pathIndex <= auto1ADBC203_ae) || (auto1ADBC203_ai < 0 && lv_pathIndex >= auto1ADBC203_ae) ) ; lv_pathIndex += auto1ADBC203_ai ) {
        if ((libNtve_gf_UnitInRegion(gv_uNIT_KERRIGAN, RegionCircle(gv_sitePath3[lv_pathIndex], 4.0)) == true)) {
            gv_sitePath3[lv_pathIndex] = null;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus04.sc2map/MapScript.galaxy:1345

    Wait(6.0, c_timeGame);
    UnitIssueOrder(UnitFromId(83), OrderTargetingPoint(AbilityCommand("move", 0), RegionGetCenter(RegionFromId(25))), c_orderQueueAddToEnd);
    while (!((libNtve_gf_UnitInRegion(UnitFromId(83), RegionFromId(25)) == true))) {
        Wait(1.0, c_timeGame);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus05.sc2map/MapScript.galaxy:518

        autoC1B63ED8_var = UnitGroupUnitFromEnd(autoC1B63ED8_g, autoC1B63ED8_u);
        if (autoC1B63ED8_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(autoC1B63ED8_var, RegionFromId(2)) != true) && (libNtve_gf_UnitInRegion(autoC1B63ED8_var, RegionFromId(18)) != true)) {
            UnitGroupAdd(gv_gROUPUnitsnotinstart, autoC1B63ED8_var);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus05.sc2map/MapScript.galaxy:518

        autoC1B63ED8_var = UnitGroupUnitFromEnd(autoC1B63ED8_g, autoC1B63ED8_u);
        if (autoC1B63ED8_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(autoC1B63ED8_var, RegionFromId(2)) != true) && (libNtve_gf_UnitInRegion(autoC1B63ED8_var, RegionFromId(18)) != true)) {
            UnitGroupAdd(gv_gROUPUnitsnotinstart, autoC1B63ED8_var);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus05.sc2map/MapScript.galaxy:2564

        }

        if (!((libNtve_gf_UnitInRegion(gv_uNITDaMothership, RegionFromId(41)) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus05.sc2map/MapScript.galaxy:4566

        auto1719A881_var = UnitGroupUnitFromEnd(auto1719A881_g, auto1719A881_u);
        if (auto1719A881_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(auto1719A881_var, RegionFromId(2)) != true)) {
            libNtve_gf_ShowHideUnit(auto1719A881_var, true);
            libNtve_gf_PauseUnit(auto1719A881_var, false);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian01.sc2map/MapScript.galaxy:6809

                auto4771A35A_var = UnitGroupUnitFromEnd(auto4771A35A_g, auto4771A35A_u);
                if (auto4771A35A_var == null) { break; }
                if ((libNtve_gf_UnitInRegion(auto4771A35A_var, RegionCircle(Point(UnitGetCustomValue(auto4771A35A_var, 0), UnitGetCustomValue(auto4771A35A_var, 1)), 1.0)) == true) && (RandomInt(1, 6) == 1)) {
                    lv_randomSpot = RegionRandomPoint(gv_briefingSlaughterAreas[lv_i].lv_zergRegion);
                    UnitSetCustomValue(auto4771A35A_var, 0, PointGetX(lv_randomSpot));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:8236

    UnitSetState(lv_lOCAL_ExtractingUnit, c_unitStateInvulnerable, true);
    while (true) {
        if ((libNtve_gf_UnitInRegion(lv_lOCAL_ExtractingUnit, RegionCircle(PointFromId(1568), 1.0)) == true)) {
            UnitSetState(lv_lOCAL_ExtractingUnit, c_unitStateHidden, true);
            UnitSetPosition(lv_lOCAL_ExtractingUnit, RegionGetCenter(RegionFromId(139)), false);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:3988

        }

        if ((UnitGetType(gv_zergDefenders[lv_unitIndex].lv_unit) != "SpineCrawlerUprooted") && (UnitGetType(gv_zergDefenders[lv_unitIndex].lv_unit) != "SporeCrawlerUprooted") && (libNtve_gf_UnitInRegion(gv_zergDefenders[lv_unitIndex].lv_unit, RegionCircle(gv_zergDefenders[lv_unitIndex].lv_position, 1.0)) == true)) {
            AISetUnitScriptControlled(gv_zergDefenders[lv_unitIndex].lv_unit, false);
            return true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:4245

            }

            if ((libNtve_gf_UnitInRegion(gv_ambientOverlords[lv_i].lv_overlord, RegionCircle(gv_ambientOverlords[lv_i].lv_destination, 1.0)) == true)) {
                gv_ambientOverlords[lv_i].lv_destination = RegionRandomPoint(RegionFromId(26));
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:4344

            autoD6231E2F_var = UnitGroupUnitFromEnd(autoD6231E2F_g, autoD6231E2F_u);
            if (autoD6231E2F_var == null) { break; }
            if ((libNtve_gf_UnitInRegion(autoD6231E2F_var, RegionCircle(Point(UnitGetCustomValue(autoD6231E2F_var, 0), UnitGetCustomValue(autoD6231E2F_var, 1)), 1.0)) == true) && (UnitGroupCount(UnitCargoGroup(autoD6231E2F_var), c_unitCountAlive) == 0)) {
                UnitIssueOrder(autoD6231E2F_var, Order(AbilityCommand("GenerateCreep", 0)), c_orderQueueReplace);
                UnitGroupRemove(lv_overlordAttackGroup, autoD6231E2F_var);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:5718

        }

        if (!((libNtve_gf_UnitInRegion(gv_tHEONEZERATUL, RegionFromId(52)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:6620

    // Transmission - SoundLink("TZeratul01Karass00062", 0)
    libCamp_gf_SendTransmissionCampaign(null, SoundLink("TZeratul01Karass00062", -1), c_transmissionDurationAdd, 1.0, true);
    if (((libNtve_gf_UnitInRegion(gv_tHEONEZERATUL, RegionFromId(101)) == false) && (libNtve_gf_UnitInRegion(gv_tHEONEZERATUL, RegionPlayableMap()) == true))) {
        // Transmission - SoundLink("TZeratul01Zeratul00044", 0)
        libCamp_gf_SendTransmissionCampaign(gv_tHEONEZERATUL, SoundLink("TZeratul01Zeratul00044", -1), c_transmissionDurationAdd, 1.0, true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:6620

    // Transmission - SoundLink("TZeratul01Karass00062", 0)
    libCamp_gf_SendTransmissionCampaign(null, SoundLink("TZeratul01Karass00062", -1), c_transmissionDurationAdd, 1.0, true);
    if (((libNtve_gf_UnitInRegion(gv_tHEONEZERATUL, RegionFromId(101)) == false) && (libNtve_gf_UnitInRegion(gv_tHEONEZERATUL, RegionPlayableMap()) == true))) {
        // Transmission - SoundLink("TZeratul01Zeratul00044", 0)
        libCamp_gf_SendTransmissionCampaign(gv_tHEONEZERATUL, SoundLink("TZeratul01Zeratul00044", -1), c_transmissionDurationAdd, 1.0, true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:6767


    while (true) {
        if ((libNtve_gf_UnitInRegion(gv_tHEONEZERATUL, RegionFromId(62)) == true) && (UnitIsAlive(UnitFromId(98)) == true)) {
            Wait(4.0, c_timeGame);
            TriggerEnable(gt_Rock01dies, true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:6835


    while (true) {
        if ((libNtve_gf_UnitInRegion(gv_tHEONEZERATUL, RegionFromId(115)) == true) && (UnitIsAlive(UnitFromId(589)) == true)) {
            Wait(3.0, c_timeGame);
            TriggerEnable(gt_Rock02dies, true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul01.sc2map/MapScript.galaxy:6905


    while (true) {
        if ((libNtve_gf_UnitInRegion(gv_tHEONEZERATUL, RegionFromId(125)) == true) && (UnitIsAlive(UnitFromId(164)) == true)) {
            Wait(2.0, c_timeGame);
            TriggerEnable(gt_Rock03dies, true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:1632

        }

        if (!((libNtve_gf_UnitInRegion(gv_hybridPhysical, RegionFromId(17)) == false))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:1928

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(17)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:1979

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(17)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:2030

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(17)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:2875

        }

        if (!((libNtve_gf_UnitInRegion(EventUnitProgressUnit(), RegionFromId(38)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:2910

        }

        if (!((libNtve_gf_UnitInRegion(EventUnitProgressUnit(), RegionFromId(39)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:4587

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(12)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:4647

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(5)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/protosspsionics.sc2map/MapScript.galaxy:1772

    }

    if ((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(31)) == true)) {
        UnitIssueOrder(EventUnit(), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(73)), c_orderQueueReplace);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/protosspsionics.sc2map/MapScript.galaxy:1776

    }

    if ((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(32)) == true)) {
        UnitIssueOrder(EventUnit(), OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(74)), c_orderQueueReplace);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:7208

    for (autoBF15FEA3_i = 1; autoBF15FEA3_i <= autoBF15FEA3_n; autoBF15FEA3_i += 1) {
        Wait(0.125, c_timeGame);
        if ((libNtve_gf_UnitInRegion(gv_viking, lv_damageRegion) == true)) {
            UnitKill(gv_viking);
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03b.sc2mapMapScript.galaxy:567

            lv_overlord = UnitGroupUnitFromEnd(auto6DAA3909_g, auto6DAA3909_u);
            if (lv_overlord == null) { break; }
            if ((UnitGetOwner(lv_overlord) == gv_p07_ZERG_INFESTED) && (libNtve_gf_UnitInRegion(lv_overlord, gv_infestationRegion[lp_colonyIndex]) == true) && (lv_defenderIndex < gv_infestationDefenderCount[lp_colonyIndex])) {
                lv_defenderIndex += 1;
                gf_CreateADefender(lv_overlord, lp_colonyIndex, lv_defenderIndex);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03b.sc2mapMapScript.galaxy:2445

    lv_colonyIndex = 1;
    for ( ; ( (autoF2EBF780_ai >= 0 && lv_colonyIndex <= autoF2EBF780_ae) || (autoF2EBF780_ai < 0 && lv_colonyIndex >= autoF2EBF780_ae) ) ; lv_colonyIndex += autoF2EBF780_ai ) {
        if ((libNtve_gf_UnitInRegion(EventUnit(), gv_infestationRegion[lv_colonyIndex]) == true)) {
            auto16B5685B_g = UnitGroup("Colonist", c_playerAny, gv_infestationRegion[lv_colonyIndex], UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
            auto16B5685B_u = UnitGroupCount(auto16B5685B_g, c_unitCountAll);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2mapMapScript.galaxy:2565

        for ( ; ( (autoDBBC6A4F_ai >= 0 && lv_i <= autoDBBC6A4F_ae) || (autoDBBC6A4F_ai < 0 && lv_i >= autoDBBC6A4F_ae) ) ; lv_i += autoDBBC6A4F_ai ) {
            if ((UnitIsAlive(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort) == true)) {
                if ((libNtve_gf_UnitInRegion(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort, RegionCircle(lv_exitPoint, 1.0)) == true)) {
                    UnitRemove(gv_trainList[lv_trainIndex].lv_escorts[lv_i].lv_escort);
                }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2mapMapScript.galaxy:4946

        }

        if (!(((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(1)) == true) || (libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(6)) == true)))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2mapMapScript.galaxy:4946

        }

        if (!(((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(1)) == true) || (libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(6)) == true)))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner02.sc2mapMapScript.galaxy:3871

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), gv_respawnableSalvage) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:4878

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(10)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:4918

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(11)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:4958

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(12)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:4998

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(26)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:5038

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(27)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2mapMapScript.galaxy:3639

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(153)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/traynor03.sc2mapMapScript.galaxy:1407

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(56)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh01.sc2mapMapScript.galaxy:2219

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(18)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:1596

        }

        if (!((libNtve_gf_UnitInRegion(EventUnit(), RegionFromId(46)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:1953

        }

        if (!((libNtve_gf_UnitInRegion(gv_tosh, RegionFromId(28)) == true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:2253


        lv_tempUnit = UnitGroupUnit(lv_patrolGroup, 1);
        if ((lv_targetCooldown == 0) && (libNtve_gf_UnitInRegion(lv_tempUnit, RegionCircle(PointWithOffsetPolar(PointFromId(1140), UnitGetCustomValue(lv_tempUnit, 0), UnitGetCustomValue(lv_tempUnit, 1)), 1.0)) == true)) {
            lv_movementTarget = PointFromId(1142);
            lv_targetCooldown = 10;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:2258

        }

        if ((lv_targetCooldown == 0) && (libNtve_gf_UnitInRegion(lv_tempUnit, RegionCircle(PointWithOffsetPolar(PointFromId(1142), UnitGetCustomValue(lv_tempUnit, 0), UnitGetCustomValue(lv_tempUnit, 1)), 1.0)) == true)) {
            lv_movementTarget = PointFromId(1140);
            lv_targetCooldown = 10;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:2263

        }

        if ((UnitIsAlive(gv_tosh) == true) && (libNtve_gf_UnitIsVisibleToPlayer(gv_tosh, gv_p6_DOMINION_ORANGE) == true) && (libNtve_gf_UnitInRegion(gv_tosh, RegionCircle(libNtve_gf_CenterOfUnitGroup(lv_patrolGroup), 9.0)) == true)) {
            UnitGroupIssueOrder(lv_patrolGroup, OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(gv_tosh)), c_orderQueueReplace);
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:2416

            auto67BD9FEE_var = UnitGroupUnitFromEnd(auto67BD9FEE_g, auto67BD9FEE_u);
            if (auto67BD9FEE_var == null) { break; }
            if ((libNtve_gf_UnitInRegion(auto67BD9FEE_var, RegionCircle(Point(UnitGetCustomValue(auto67BD9FEE_var, 0), UnitGetCustomValue(auto67BD9FEE_var, 1)), 2.0)) == true)) {
                if ((RandomInt(1, 40) == 1)) {
                    lv_randomPoint = RegionRandomPoint(RegionFromId(45));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:2663

            auto0F10452F_var = UnitGroupUnitFromEnd(auto0F10452F_g, auto0F10452F_u);
            if (auto0F10452F_var == null) { break; }
            if ((libNtve_gf_UnitInRegion(auto0F10452F_var, RegionCircle(Point(UnitGetCustomValue(auto0F10452F_var, 0), UnitGetCustomValue(auto0F10452F_var, 1)), 2.0)) == true)) {
                if ((RandomInt(1, 32) == 1)) {
                    lv_randomPoint = RegionRandomPoint(RegionFromId(47));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:2750

        if (lv_driver == null) { break; }
        if ((UnitOrder(lv_driver, 0) == null)) {
            if ((libNtve_gf_UnitInRegion(lv_driver, RegionFromId(13)) == true)) {
                lv_targetDiamondback = libNtve_gf_ClosestUnitToPoint(UnitGetPosition(lv_driver), gv_nonActivatedDiamondbacks);
                UnitGroupRemove(gv_nonActivatedDiamondbacks, lv_targetDiamondback);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:2757

            }

            if ((libNtve_gf_UnitInRegion(lv_driver, RegionFromId(43)) == true)) {
                gv_firstDiamondbacksActivated += 1;
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2mapMapScript.galaxy:2761

            }

            if ((libNtve_gf_UnitInRegion(lv_driver, RegionFromId(44)) == true)) {
                gv_firstSiegeTanksActivated += 1;
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03b.sc2mapMapScript.galaxy:2438

    // Conditions
    if (testConds) {
        if (!((libNtve_gf_UnitInRegion(gv_p2Raven, RegionFromId(50)) != true))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus01.sc2mapMapScript.galaxy:2108

        Wait(2.0, c_timeGame);
        libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionFromId(66), "ArtifactShrine", c_animNameDefault, "Stand B", c_animFlagPlayForever, c_animTimeDefault);
        while (!((libNtve_gf_UnitInRegion(lv_victoryUnit, RegionCircle(UnitGetPosition(gv_artifact), 2.0)) == true))) {
            Wait(1.0, c_timeGame);
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus01.sc2mapMapScript.galaxy:5094

    // Transmission - SoundLink("TTychus01Swann00011", 0)
    libCamp_gf_SendTransmissionCampaign(null, SoundLink("TTychus01Swann00011", -1), c_transmissionDurationAdd, 0.0, true);
    while (!((libNtve_gf_UnitInRegion(lv_victoryDropship, RegionCircle(UnitGetPosition(gv_artifact), 2.0)) == true))) {
        Wait(1.0, c_timeGame);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2mapMapScript.galaxy:3721

        autoF58A53C8_var = UnitGroupUnitFromEnd(autoF58A53C8_g, autoF58A53C8_u);
        if (autoF58A53C8_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(autoF58A53C8_var, RegionFromId(6)) == false)) {
            UnitGroupRemove(lv_localUnits, autoF58A53C8_var);
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2mapMapScript.galaxy:3800

        autoB08D0E56_var = UnitGroupUnitFromEnd(autoB08D0E56_g, autoB08D0E56_u);
        if (autoB08D0E56_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(autoB08D0E56_var, RegionFromId(6)) == false)) {
            UnitGroupRemove(lv_localUnits, autoB08D0E56_var);
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2mapMapScript.galaxy:2513

            auto1C94DF8F_var = UnitGroupUnitFromEnd(auto1C94DF8F_g, auto1C94DF8F_u);
            if (auto1C94DF8F_var == null) { break; }
            if ((libNtve_gf_UnitInRegion(auto1C94DF8F_var, gv_kerrigansTarget) == true)) {
                lv_tARGETunit = auto1C94DF8F_var;
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2mapMapScript.galaxy:2608

    }

    if ((gv_fLAGKerrigansearching == true) && (libNtve_gf_UnitInRegion(EventUnit(), gv_kerrigansTarget) == true)) {
        TriggerDebugOutput(1, StringExternal("Param/Value/9F0B2A76"), false);
        UnitBehaviorRemove(gv_uNIT_KERRIGAN, "ProgressBar", 1);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2mapMapScript.galaxy:4420

    lv_pathIndex = 1;
    for ( ; ( (autoE23FE336_ai >= 0 && lv_pathIndex <= autoE23FE336_ae) || (autoE23FE336_ai < 0 && lv_pathIndex >= autoE23FE336_ae) ) ; lv_pathIndex += autoE23FE336_ai ) {
        if ((libNtve_gf_UnitInRegion(gv_uNIT_KERRIGAN, RegionCircle(gv_sitePath1[lv_pathIndex], 4.0)) == true)) {
            gv_sitePath1[lv_pathIndex] = null;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2mapMapScript.galaxy:4455

    lv_pathIndex = 1;
    for ( ; ( (autoD14FAD6E_ai >= 0 && lv_pathIndex <= autoD14FAD6E_ae) || (autoD14FAD6E_ai < 0 && lv_pathIndex >= autoD14FAD6E_ae) ) ; lv_pathIndex += autoD14FAD6E_ai ) {
        if ((libNtve_gf_UnitInRegion(gv_uNIT_KERRIGAN, RegionCircle(gv_sitePath2[lv_pathIndex], 4.0)) == true)) {
            gv_sitePath2[lv_pathIndex] = null;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2mapMapScript.galaxy:4490

    lv_pathIndex = 1;
    for ( ; ( (auto1ADBC203_ai >= 0 && lv_pathIndex <= auto1ADBC203_ae) || (auto1ADBC203_ai < 0 && lv_pathIndex >= auto1ADBC203_ae) ) ; lv_pathIndex += auto1ADBC203_ai ) {
        if ((libNtve_gf_UnitInRegion(gv_uNIT_KERRIGAN, RegionCircle(gv_sitePath3[lv_pathIndex], 4.0)) == true)) {
            gv_sitePath3[lv_pathIndex] = null;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus04.sc2mapMapScript.galaxy:1345

    Wait(6.0, c_timeGame);
    UnitIssueOrder(UnitFromId(83), OrderTargetingPoint(AbilityCommand("move", 0), RegionGetCenter(RegionFromId(25))), c_orderQueueAddToEnd);
    while (!((libNtve_gf_UnitInRegion(UnitFromId(83), RegionFromId(25)) == true))) {
        Wait(1.0, c_timeGame);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus05.sc2mapMapScript.galaxy:518

        autoC1B63ED8_var = UnitGroupUnitFromEnd(autoC1B63ED8_g, autoC1B63ED8_u);
        if (autoC1B63ED8_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(autoC1B63ED8_var, RegionFromId(2)) != true) && (libNtve_gf_UnitInRegion(autoC1B63ED8_var, RegionFromId(18)) != true)) {
            UnitGroupAdd(gv_gROUPUnitsnotinstart, autoC1B63ED8_var);
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus05.sc2mapMapScript.galaxy:518

        autoC1B63ED8_var = UnitGroupUnitFromEnd(autoC1B63ED8_g, autoC1B63ED8_u);
        if (autoC1B63ED8_var == null) { break; }
        if ((libNtve_gf_UnitInRegion(autoC1B63ED8_var, RegionFromId(2)) != true) && (libNtve_gf_UnitInRegion(autoC1B63ED8_var, RegionFromId(18)) != true)) {
            UnitGroupAdd(gv_gROUPUnitsnotinstart, autoC1B63ED8_var);
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus05.sc2mapMapScript.galaxy:2564

        }

        if (!((libNtve_gf_UnitInRegion(gv_uNITDaMothership, RegionFromId(41)) == false))) {
            return false;
        }