# Random Integer

Grammar — Random integer between min and max
FlagsNative | Function

Returns a random integer between the specified values (inclusive).

# Arguments

  • int — Min
  • int — Max

Returns — int

native int RandomInt(int min, int max);

Category: Math / Random

# Examples

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

    for ( ; ( (autoE9518B94_ai >= 0 && lv_index <= autoE9518B94_ae) || (autoE9518B94_ai <= 0 && lv_index >= autoE9518B94_ae) ) ; lv_index += autoE9518B94_ai ) {
        lv_x = (lp_centerX + (IntToFixed(lv_index) + 0.0));
        if ((RandomInt(1, 10) <= lp_bullet)) {
            lv_shoot = 1;
        }

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

    for ( ; ( (auto4F293FB9_ai >= 0 && lv_index <= auto4F293FB9_ae) || (auto4F293FB9_ai <= 0 && lv_index >= auto4F293FB9_ae) ) ; lv_index += auto4F293FB9_ai ) {
        lv_x = (lp_centerX + (IntToFixed(lv_index) + 0.0));
        if ((RandomInt(1, 10) <= lp_bullet)) {
            lv_shoot = 1;
        }

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

            else {
            }
            if ((RandomInt(1, lp_count) <= lp_bullet)) {
                lv_shoot = 1;
            }

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

    else {
    }
    if ((RandomInt(0, 1) == 1)) {
        lv_leftSide = true;
    }

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

        else {
        }
        if ((RandomInt(1, 3) == 1)) {
            libNtve_gf_SendActorMessageToUnit(lp_battlecruiser, "AnimBracketStart HunterSeeker Stand,Work,Start Stand,Work Stand,Work,End");
            Wait(1.0, c_timeGame);

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


    // Implementation
    lv_randomNumber = RandomInt(1, 4);
    auto0E39FF52_val = lv_randomNumber;
    if (auto0E39FF52_val == 1) {

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


    // Implementation
    lv_randomNumber = RandomInt(1, 2);
    auto19EC1E16_val = lv_randomNumber;
    if (auto19EC1E16_val == 1) {

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

        lv_images[9] = "Assets\\Textures\\loading-marsara.dds";
        lv_images[10] = "Assets\\Textures\\loading-xil.dds";
        libNtve_gf_SetDialogItemImage(gv_fadeImage, lv_images[RandomInt(1, 10)], PlayerGroupAll());
        libNtve_gf_SetDialogItemImage(gv_fadeImage, lv_images[2], PlayerGroupAll());
    }

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

        Wait(RandomFixed(1.0, 2.0), c_timeGame);
        if ((lv_shootDelay <= 0)) {
            lv_shootDelay = RandomInt(1, 1);
            lv_index = 0;
        }

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

            lv_posViking = UnitGetPosition(gv_viking);
            lv_angle = AngleBetweenPoints(lv_posInterceptor, lv_posViking);
            if ((UnitIsAlive(gv_viking) == true) && (RandomInt(1, 3) == 1)) {
                lv_target = PointWithOffsetPolar(lv_posInterceptor, 30.0, lv_angle);
            }

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

            auto5E2EB195_var = UnitGroupUnitFromEnd(auto5E2EB195_g, auto5E2EB195_u);
            if (auto5E2EB195_var == null) { break; }
            if ((RandomInt(1, 3) == 1)) {
                lv_tempPoint = PointWithOffsetPolar(UnitGetPosition(auto5E2EB195_var), RandomFixed(0.5, 1.5), RandomFixed(0.0, 360.0));
                if ((RegionContainsPoint(RegionFromId(37), lv_tempPoint) == true)) {

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

            autoCE810A15_var = UnitGroupUnitFromEnd(autoCE810A15_g, autoCE810A15_u);
            if (autoCE810A15_var == null) { break; }
            if ((RandomInt(1, 5) == 1)) {
                lv_tempPoint = PointWithOffsetPolar(UnitGetPosition(autoCE810A15_var), RandomFixed(0.5, 1.5), RandomFixed(0.0, 360.0));
                if ((RegionContainsPoint(RegionFromId(14), lv_tempPoint) == true)) {

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

        auto22ED42E6_var = UnitGroupUnitFromEnd(auto22ED42E6_g, auto22ED42E6_u);
        if (auto22ED42E6_var == null) { break; }
        if ((RandomInt(1, 2) == 1)) {
            UnitIssueOrder(auto22ED42E6_var, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(1654)), c_orderQueueReplace);
        }

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

        autoA3B380D9_var = UnitGroupUnitFromEnd(autoA3B380D9_g, autoA3B380D9_u);
        if (autoA3B380D9_var == null) { break; }
        if ((RandomInt(1, 2) == 1)) {
            UnitIssueOrder(autoA3B380D9_var, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(1654)), c_orderQueueReplace);
        }

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

        auto63B6EB01_var = UnitGroupUnitFromEnd(auto63B6EB01_g, auto63B6EB01_u);
        if (auto63B6EB01_var == null) { break; }
        if ((RandomInt(1, 2) == 1)) {
            UnitIssueOrder(auto63B6EB01_var, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(1654)), c_orderQueueReplace);
        }

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

    }

    lv_random = RandomInt(0, 3);
    autoEF719771_g = UnitGroup("ColonistFemale", gv_pLAYER_05_REFUGEES, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    autoEF719771_u = UnitGroupCount(autoEF719771_g, c_unitCountAll);

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

        autoEF719771_var = UnitGroupUnitFromEnd(autoEF719771_g, autoEF719771_u);
        if (autoEF719771_var == null) { break; }
        lv_random = RandomInt(0, 1);
        if ((lv_random == 1)) {
            libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(autoEF719771_var), c_animNameDefault, "Talk", c_animFlagNonLooping, c_animTimeDefault);

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

        auto25373960_var = UnitGroupUnitFromEnd(auto25373960_g, auto25373960_u);
        if (auto25373960_var == null) { break; }
        lv_random = RandomInt(0, 1);
        if ((lv_random == 1)) {
            libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(auto25373960_var), c_animNameDefault, "Talk", c_animFlagNonLooping, c_animTimeDefault);

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

    }

    lv_random = RandomInt(1, 6);
    autoD9A2EFF3_val = lv_random;
    if (autoD9A2EFF3_val == 1) {

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

    }

    lv_random = RandomInt(1, 5);
    Wait(5.0, c_timeGame);
    if ((gv_day == 1)) {

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

    }

    lv_random = RandomInt(1, 3);
    Wait(5.0, c_timeGame);
    if ((gv_night == 1)) {

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


    lv_colonistShip = UnitFromId(1678);
    auto8DA947A7_val = RandomInt(1, 6);
    if (auto8DA947A7_val == 1) {
        lv_pickedPoint = PointFromId(65);

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

    else {
    }
    autoE0C65E9D_val = RandomInt(1, 2);
    if (autoE0C65E9D_val == 1) {
        libNtve_gf_CreateUnitsAtPoint2(1, "Colonist", 0, gv_pLAYER03_COLONIST, lv_pickedPoint);

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


    lv_colonistShip = UnitFromId(2722);
    autoEC18A36F_val = RandomInt(1, 7);
    if (autoEC18A36F_val == 1) {
        lv_pickedPoint = PointFromId(1390);

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

    else {
    }
    auto811AB252_val = RandomInt(1, 2);
    if (auto811AB252_val == 1) {
        libNtve_gf_CreateUnitsAtPoint2(1, "Colonist", 0, gv_pLAYER03_COLONIST, lv_pickedPoint);

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


    lv_colonistShip = UnitFromId(1594);
    auto69B4F450_val = RandomInt(1, 6);
    if (auto69B4F450_val == 1) {
        lv_pickedPoint = PointFromId(190);

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

    else {
    }
    autoCD6601C2_val = RandomInt(1, 2);
    if (autoCD6601C2_val == 1) {
        libNtve_gf_CreateUnitsAtPoint2(1, "Colonist", 0, gv_pLAYER03_COLONIST, lv_pickedPoint);

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

        auto6D075084_var = UnitGroupUnitFromEnd(auto6D075084_g, auto6D075084_u);
        if (auto6D075084_var == null) { break; }
        lv_random = RandomInt(1, 2);
        autoF2EED703_val = lv_random;
        if (autoF2EED703_val == 1) {

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

        auto17F1269E_var = UnitGroupUnitFromEnd(auto17F1269E_g, auto17F1269E_u);
        if (auto17F1269E_var == null) { break; }
        lv_random = RandomInt(1, 2);
        autoBBF23CA4_val = lv_random;
        if (autoBBF23CA4_val == 1) {

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

    while (true) {
        Wait(RandomFixed(0.0, 1.5), c_timeGame);
        if ((RandomInt(1, 4) == 1)) {
            libNtve_gf_CreateUnitsAtPoint2(1, "VoidRay", 0, gv_pLAYER02_PROTOSS, RegionRandomPoint(RegionFromId(43)));
        }

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

        }
        else {
            if ((RandomInt(1, 2) == 1)) {
                libNtve_gf_CreateUnitsAtPoint2(1, "Phoenix", 0, gv_pLAYER02_PROTOSS, RegionRandomPoint(RegionFromId(43)));
            }

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


    // Implementation
    lv_rND = RandomInt(1, 3);
    autoD24B01C0_val = lv_rND;
    if (autoD24B01C0_val == 1) {

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

    }

    if ((RandomInt(1, 6) == 1)) {
        UnitIssueOrder(lv_colonist, OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionCircle(RegionGetCenter(lp_locale), 2.0))), c_orderQueueReplace);
    }

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

        auto9BF3A280_n = gv_trainMinerals[libNtve_gf_DifficultyValueInt(1, 2, 3, 4)][MinI(gv_trainsDestroyed, 7)];
        for (auto9BF3A280_i = 1; auto9BF3A280_i <= auto9BF3A280_n; auto9BF3A280_i += 1) {
            UnitCreate(1, "PalletMinerals", 0, 0, RegionRandomPoint(RegionCircle(UnitGetPosition(gv_trainList[lv_trainIndex].lv_trainCars[RandomInt(1, gv_trainList[lv_trainIndex].lv_lastCar)]), 2.0)), RandomFixed(0.0, 360.0));
            libNtve_gf_ShareVisionofUnit(UnitLastCreated(), true, gv_pLAYER_01_USER);
        }

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

        auto475F7BBB_n = gv_trainGas;
        for (auto475F7BBB_i = 1; auto475F7BBB_i <= auto475F7BBB_n; auto475F7BBB_i += 1) {
            UnitCreate(1, "PalletGas", 0, 0, RegionRandomPoint(RegionCircle(UnitGetPosition(gv_trainList[lv_trainIndex].lv_trainCars[RandomInt(1, gv_trainList[lv_trainIndex].lv_lastCar)]), 2.0)), RandomFixed(0.0, 360.0));
            libNtve_gf_ShareVisionofUnit(UnitLastCreated(), true, gv_pLAYER_01_USER);
        }

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

        }

        auto29FF27A9_val = RandomInt(1, 4);
        if (auto29FF27A9_val == 1) {
            libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lv_trainCarToAnimate_LOCAL), c_animNameDefault, "Stand Work", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);

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

    }

    lv_random = RandomInt(1, 2);
    auto9A94EAEE_val = lv_random;
    if (auto9A94EAEE_val == 1) {

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

    }
    Wait(RandomFixed(2.0, 4.0), c_timeGame);
    lv_random = RandomInt(1, 2);
    autoD651B133_val = lv_random;
    if (autoD651B133_val == 1) {

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

    }
    Wait(RandomFixed(2.0, 4.0), c_timeGame);
    lv_random = RandomInt(1, 2);
    auto9177EB0C_val = lv_random;
    if (auto9177EB0C_val == 1) {

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

    }
    Wait(RandomFixed(2.0, 4.0), c_timeGame);
    lv_random = RandomInt(1, 2);
    auto9BB4536C_val = lv_random;
    if (auto9BB4536C_val == 1) {

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


        if ((ModI(lv_count, 12) == 0)) {
            auto0BECB369_val = RandomInt(1, 3);
            if (auto0BECB369_val == 1) {
                SoundPlay(SoundLink("TUI_ArmoryConsoleExit", -1), PlayerGroupAll(), 100.0, 0.0);

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

    }

    lv_random = RandomInt(1, 7);
    gv_civilianVehicleCounter += 1;
    auto257BD5B4_val = lv_random;

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

    }

    lv_random = RandomInt(1, 7);
    gv_civilianVehicleCounter += 1;
    auto00442D74_val = lv_random;

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

    }

    lv_random = RandomInt(1, 7);
    gv_civilianVehicleCounter += 1;
    autoE43E0056_val = lv_random;

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

    }

    lv_random = RandomInt(1, 2);
    autoF04FDBAA_val = lv_random;
    if (autoF04FDBAA_val == 1) {

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

    }

    lv_random = RandomInt(1, 2);
    auto6AB8FC97_val = lv_random;
    if (auto6AB8FC97_val == 1) {

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

    gf_WaitForDropsAndAttack(UnitGetPosition(UnitFromId(808)));
    if ((libNtve_gf_DifficultyValueInt(0, 1, 1, 1) == 1)) {
        if ((RandomInt(0, 1) == 0)) {
            UnitCreate(1, "Raven", 0, gv_p08_DOMINION, PointFromId(1076), 270.0);
        }

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

                autoD865BB89_var = UnitGroupUnitFromEnd(autoD865BB89_g, autoD865BB89_u);
                if (autoD865BB89_var == null) { break; }
                if ((RandomInt(1, 2) <= 1)) {
                    autoE58CDC3B_val = RandomInt(0, 2);
                    if (autoE58CDC3B_val == 0) {

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

                if (autoD865BB89_var == null) { break; }
                if ((RandomInt(1, 2) <= 1)) {
                    autoE58CDC3B_val = RandomInt(0, 2);
                    if (autoE58CDC3B_val == 0) {
                        UnitIssueOrder(autoD865BB89_var, Order(AbilityCommand("move", 2)), c_orderQueueReplace);

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

        auto14FBE439_var = UnitGroupUnitFromEnd(auto14FBE439_g, auto14FBE439_u);
        if (auto14FBE439_var == null) { break; }
        if ((RandomInt(1, 8) <= 4)) {
            autoDCFB51D0_val = RandomInt(0, 2);
            if (autoDCFB51D0_val == 0) {

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

        if (auto14FBE439_var == null) { break; }
        if ((RandomInt(1, 8) <= 4)) {
            autoDCFB51D0_val = RandomInt(0, 2);
            if (autoDCFB51D0_val == 0) {
                UnitIssueOrder(auto14FBE439_var, Order(AbilityCommand("move", 2)), c_orderQueueReplace);

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

        }
        else {
            if ((RandomInt(1, 8) <= 4)) {
                UnitIssueOrder(auto14FBE439_var, OrderTargetingPoint(AbilityCommand("move", 4), UnitGetPosition(libNtve_gf_ClosestUnitToPoint(UnitGetPosition(auto14FBE439_var), UnitGroup(null, gv_p1_USER, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0)))), c_orderQueueAddToEnd);
            }

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


    TriggerEnable(TriggerGetCurrent(), false);
    auto182B399C_val = RandomInt(0, 2);
    if (auto182B399C_val == 0) {
        auto1DC2F67E_val = RandomInt(0, 2);

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

    auto182B399C_val = RandomInt(0, 2);
    if (auto182B399C_val == 0) {
        auto1DC2F67E_val = RandomInt(0, 2);
        if (auto1DC2F67E_val == 0) {
            UnitIssueOrder(UnitFromId(10), OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(23))), c_orderQueueReplace);

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

    }
    else if (auto182B399C_val == 1) {
        auto937DAFB3_val = RandomInt(0, 2);
        if (auto937DAFB3_val == 0) {
            UnitIssueOrder(UnitFromId(719), OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(60))), c_orderQueueReplace);

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

        auto67CB5E3A_var = UnitGroupUnitFromEnd(auto67CB5E3A_g, auto67CB5E3A_u);
        if (auto67CB5E3A_var == null) { break; }
        if ((RandomInt(1, 4) <= 4)) {
            auto1F2639CC_val = RandomInt(0, 2);
            if (auto1F2639CC_val == 0) {

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

        if (auto67CB5E3A_var == null) { break; }
        if ((RandomInt(1, 4) <= 4)) {
            auto1F2639CC_val = RandomInt(0, 2);
            if (auto1F2639CC_val == 0) {
                UnitIssueOrder(auto67CB5E3A_var, Order(AbilityCommand("move", 2)), c_orderQueueReplace);

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

        }

        if ((RandomInt(1, 4) == 1)) {
            UnitIssueOrder(lv_miner, OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(6))), c_orderQueueReplace);
            Wait(2.0, c_timeGame);

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

        }

        if ((RandomInt(1, 4) == 1)) {
            UnitIssueOrder(lv_miner, OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(10))), c_orderQueueReplace);
            Wait(2.0, c_timeGame);

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

        }

        if ((RandomInt(1, 4) == 1)) {
            UnitIssueOrder(lv_miner, OrderTargetingPoint(AbilityCommand("move", 0), RegionRandomPoint(RegionFromId(13))), c_orderQueueReplace);
            Wait(2.0, c_timeGame);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:2818

    TriggerDebugOutput(1, (StringExternal("Param/Value/D3B1D2B5") + libNtve_gf_ConvertBooleanToText(gv_jukeboxes[lp_jukeboxID].lv_startRandom) + StringExternal("Param/Value/A67D1B1C") + libNtve_gf_ConvertBooleanToText(gv_jukeboxes[lp_jukeboxID].lv_playback.lv_startedBefore)), false);
    if ((gv_jukeboxes[lp_jukeboxID].lv_startRandom == true) && (gv_jukeboxes[lp_jukeboxID].lv_playback.lv_startedBefore == false)) {
        gv_jukeboxes[lp_jukeboxID].lv_playback.lv_trackCurrent = RandomInt(1, 5);
    }
    else {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:6372

    lv_bGLocationIndex = 1;
    for ( ; ( (auto7EB0D9E3_ai >= 0 && lv_bGLocationIndex <= auto7EB0D9E3_ae) || (auto7EB0D9E3_ai <= 0 && lv_bGLocationIndex >= auto7EB0D9E3_ae) ) ; lv_bGLocationIndex += auto7EB0D9E3_ai ) {
        lv_bGLocationRandom = RandomInt(lv_bGLocationIndex, gv_cantinaBGLocCount);
        if ((lv_bGLocationRandom != lv_bGLocationIndex)) {
            lv_bGLocationSwap = lv_bGLocationIndexArray[lv_bGLocationIndex];

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:6384

    lv_actorIndex = 1;
    for ( ; ( (autoA632537C_ai >= 0 && lv_actorIndex <= autoA632537C_ae) || (autoA632537C_ai <= 0 && lv_actorIndex >= autoA632537C_ae) ) ; lv_actorIndex += autoA632537C_ai ) {
        lv_actorIndexRandom = RandomInt(lv_actorIndex, lv_alwaysActorCount);
        if ((lv_actorIndexRandom != lv_actorIndex)) {
            lv_actorIDSwap = lv_alwaysActor[lv_actorIndex];

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:6396

    lv_actorIndex = 1;
    for ( ; ( (auto6A314E41_ai >= 0 && lv_actorIndex <= auto6A314E41_ae) || (auto6A314E41_ai <= 0 && lv_actorIndex >= auto6A314E41_ae) ) ; lv_actorIndex += auto6A314E41_ai ) {
        lv_actorIndexRandom = RandomInt(lv_actorIndex, lv_possibleActorCount);
        if ((lv_actorIndexRandom != lv_actorIndex)) {
            lv_actorIDSwap = lv_possibleActor[lv_actorIndex];

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:7344

    // Implementation
    if ((gv_armoryGreaseMonkeyPlacement == -1)) {
        gv_armoryGreaseMonkeyPlacement = RandomInt(0, 7);
        if ((libCamp_gf_MissionStatusCheck(libCamp_ge_MapID_MapTHanson01, libCamp_ge_MissionStatus_Completed) == false) && (gv_armoryGreaseMonkeyPlacement == 0)) {
            gv_armoryGreaseMonkeyPlacement = 1;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:13500

    if ((lp_transientAnim == true)) {
        libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lp_roomID, lp_screen)), gv_aNIMID_BRIEFINGVIDEOSWAP, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
        lv_wipeSoundIndex = RandomInt(1, 3);
        autoF8AD0AE9_val = lv_wipeSoundIndex;
        if (autoF8AD0AE9_val == 1) {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:20691

    Wait(2.0, c_timeGame);
    while (true) {
        auto756AE77B_val = RandomInt(1, 6);
        if (auto756AE77B_val == 1) {
            libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_ActorUnit(ge_ActorID_ActorTychus)), gv_aNIMID_CHARTYCHUSANDGUN_STAND2, "Attack A", c_animFlagPlayForever, c_animTimeDefault);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:4062

    libNtve_gf_CreateUnitsAtPoint2(1, "Pylon", 0, gv_p2_PROTOSS_EAST_ATTACKERS, PointFromId(1725));
    while (true) {
        if ((RandomInt(1, 3) == 1)) {
            libNtve_gf_CreateUnitsAtPoint2(1, "Stalker", 0, gv_p2_PROTOSS_EAST_ATTACKERS, RegionRandomPoint(RegionFromId(17)));
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:4069

        }
        UnitIssueOrder(UnitLastCreated(), OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(1720)), c_orderQueueReplace);
        if ((RandomInt(1, 2) == 1)) {
            UnitIssueOrder(UnitLastCreated(), OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(1721)), c_orderQueueAddToEnd);
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:4134

    Wait(2.0, c_timeReal);
    while (true) {
        if ((RandomInt(1, 2) == 1)) {
            libNtve_gf_CreateUnitsAtPoint2(1, "VoidRay", 0, gv_p2_PROTOSS_EAST_ATTACKERS, RegionRandomPoint(RegionFromId(14)));
        }

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

    TriggerEnable(TriggerGetCurrent(), false);
    UIAlertPoint("Trigger", gv_p1_USER, StringExternal("Param/Value/91FF803F"), null, UnitGetPosition(EventUnit()));
    auto720DA649_val = RandomInt(0, 3);
    if (auto720DA649_val == 0) {
        TriggerQueueEnter();

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

            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));
                    UnitSetCustomValue(auto67BD9FEE_var, 0, PointGetX(lv_randomPoint));

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

            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));
                    UnitSetCustomValue(auto0F10452F_var, 0, PointGetX(lv_randomPoint));

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

    }

    if ((RandomInt(1, 2) == 1)) {
        lv_chosenTank = UnitGroupUnit(UnitGroup("SiegeTank", 0, RegionFromId(20), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1);
        libNtve_gf_RescueUnit(lv_chosenTank, gv_p12_ALLIED_CELLBLOCK_B, true);

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

            }
            else {
                if ((RandomInt(1, 3) == 1)) {
                    UnitIssueOrder(autoB111683E_var, OrderTargetingPoint(AbilityCommand("attack", 0), Point(UnitGetCustomValue(autoB111683E_var, 0), UnitGetCustomValue(autoB111683E_var, 1))), c_orderQueueReplace);
                }

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

    UnitGroupAdd(gv_midCinematicProtoss, EventUnit());
    Wait(8.0, c_timeGame);
    if ((RandomInt(1, 2) == 1)) {
        UnitIssueOrder(EventUnit(), OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(688)), c_orderQueueReplace);
    }

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

    }

    lv_randomDirectionPicker = RandomInt(1, 5);
    if ((lv_randomDirectionPicker == 1)) {
        if ((UnitIsAlive(gv_uNITWarpPrismNW) == false)) {

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

    if ((lv_buildingDropType == ge_BuildingDropPodType_Explodey)) {
        SoundPlay(SoundLink("Ghost_NukeDrop", -1), PlayerGroupAll(), 100.0, 0.0);
        autoCF5FA138_val = RandomInt(0, 1);
        if (autoCF5FA138_val == 0) {
            UnitIssueOrder(lv_droppedBuilding, OrderTargetingPoint(AbilityCommand("move", 0), PointWithOffsetPolar(UnitGetPosition(lv_droppedBuilding), 8.0, RandomFixed(195.0, 255.0))), c_orderQueueReplace);

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

    }

    auto113A4E1E_val = RandomInt(0, 7);
    if (auto113A4E1E_val == 0) {
        libNtve_gf_CreateUnitsAtPoint2(1, "ZerglingBurrowed", 0, gv_p07_ZERG_PINK, PointFromId(1307));

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

        auto2D01491B_var = UnitGroupUnitFromEnd(auto2D01491B_g, auto2D01491B_u);
        if (auto2D01491B_var == null) { break; }
        autoE29C4363_val = RandomInt(0, 8);
        if (autoE29C4363_val == 0) {
            UnitIssueOrder(auto2D01491B_var, OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(284)), c_orderQueueReplace);

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

    libNtve_gf_CreateActorAtPoint("CharCrashingBarracks", PointFromId(267));
    lv_crashBarracks02 = libNtve_gf_ActorLastCreated();
    auto57982A3B_val = RandomInt(0, 1);
    if (auto57982A3B_val == 0) {
        libNtve_gf_MakeModelFaceAngle(lv_crashBarracks02, RandomFixed(135.0, 225.0));

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

    libNtve_gf_CreateActorAtPoint("CharCrashingFactory", PointFromId(268));
    lv_crashFactory01 = libNtve_gf_ActorLastCreated();
    auto4FF0DC47_val = RandomInt(0, 1);
    if (auto4FF0DC47_val == 0) {
        libNtve_gf_MakeModelFaceAngle(lv_crashFactory01, RandomFixed(135.0, 225.0));

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

    libNtve_gf_CreateActorAtPoint("CharCrashingFactory", PointFromId(1145));
    lv_crashFactory02 = libNtve_gf_ActorLastCreated();
    auto96A5988F_val = RandomInt(0, 1);
    if (auto96A5988F_val == 0) {
        libNtve_gf_MakeModelFaceAngle(lv_crashFactory02, RandomFixed(135.0, 225.0));

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

    libNtve_gf_CreateActorAtPoint("CharCrashingBattlecruiser", PointFromId(1148));
    lv_crashBattlecruiser01 = libNtve_gf_ActorLastCreated();
    autoD1E67D9F_val = RandomInt(0, 1);
    if (autoD1E67D9F_val == 0) {
        libNtve_gf_MakeModelFaceAngle(lv_crashBattlecruiser01, RandomFixed(135.0, 225.0));

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

    libNtve_gf_CreateActorAtPoint("CharCrashingBattlecruiser", PointFromId(1149));
    lv_crashBattlecruiser02 = libNtve_gf_ActorLastCreated();
    auto7B53D032_val = RandomInt(0, 1);
    if (auto7B53D032_val == 0) {
        libNtve_gf_MakeModelFaceAngle(lv_crashBattlecruiser02, RandomFixed(135.0, 225.0));

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/tvalerian01.sc2map/MapScript.galaxy:6876

    }
    else {
        if ((RandomInt(1, 2) == 1)) {
            UnitCreate(1, UnitGetType(EventUnit()), 0, gv_p02_ZERG_PURPLE_NE, PointFromId(13), 225.0);
        }

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

    UnitKill(UnitLastCreated());
    Wait(0.1, c_timeGame);
    auto84E2776E_val = RandomInt(1, 5);
    if (auto84E2776E_val == 1) {
        UnitCreate(3, "InfestedCivilian", 0, gv_p2_ZERG, lv_poppedEggPoint, libNtve_gf_RandomAngle());

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

                }
                else {
                    UnitSetCustomValue(autoCDD652E0_var, 0, IntToFixed(RandomInt(4, 6)));
                }
            }

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

        auto35B0DCFC_var = UnitGroupUnitFromEnd(auto35B0DCFC_g, auto35B0DCFC_u);
        if (auto35B0DCFC_var == null) { break; }
        if ((RandomInt(1, 2) == 1)) {
            UnitIssueOrder(auto35B0DCFC_var, OrderTargetingPoint(AbilityCommand("move", 4), RegionRandomPoint(RegionCircle(UnitGetPosition(auto35B0DCFC_var), 1.0))), c_orderQueueReplace);
        }

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

        auto6CD835DB_var = UnitGroupUnitFromEnd(auto6CD835DB_g, auto6CD835DB_u);
        if (auto6CD835DB_var == null) { break; }
        if ((RandomInt(1, 2) == 1)) {
            UnitIssueOrder(auto6CD835DB_var, OrderTargetingPoint(AbilityCommand("move", 4), RegionRandomPoint(RegionCircle(UnitGetPosition(auto6CD835DB_var), 1.0))), c_orderQueueReplace);
        }

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

        autoA05C6836_var = UnitGroupUnitFromEnd(autoA05C6836_g, autoA05C6836_u);
        if (autoA05C6836_var == null) { break; }
        if ((RandomInt(1, 2) == 1)) {
            UnitIssueOrder(autoA05C6836_var, OrderTargetingPoint(AbilityCommand("move", 4), RegionRandomPoint(RegionCircle(UnitGetPosition(autoA05C6836_var), 1.0))), c_orderQueueReplace);
        }

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

        autoD468B649_var = UnitGroupUnitFromEnd(autoD468B649_g, autoD468B649_u);
        if (autoD468B649_var == null) { break; }
        if ((RandomInt(1, 2) == 1)) {
            UnitIssueOrder(autoD468B649_var, OrderTargetingPoint(AbilityCommand("move", 4), UnitGetPosition(gv_tHEONEBROODMOTHER)), c_orderQueueReplace);
        }

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

        AIAttackWaveSetTargetPoint(gv_nextWavePlayer, UnitGetPosition(gv_artifact));
        AIAttackWaveSetGatherEarlyNoReplace(gv_nextWavePlayer);
        if ((RandomInt(1, 2) == 1)) {
            AIAttackWaveSetGatherPoint(gv_nextWavePlayer, PointFromId(713));
        }

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

    libCamp_gf_SetAllSoundChannelVolumesCampaign(libNtve_ge_VolumeChannelMode_Speech);
    libLbty_gf_PlayTransmissionCueSound(PlayerGroupAll());
    auto87B403FB_val = RandomInt(1, 3);
    if (auto87B403FB_val == 1) {
        // Transmission - SoundLink("TValerian03Horner00070", -1)

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

    }
    else {
        auto22463A28_val = RandomInt(1, 3);
        if (auto22463A28_val == 1) {
            // Transmission - SoundLink("TValerian03Horner00044", -1)

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

    UnitGroupIssueOrder(lv_hunterKillers, Order(AbilityCommand("BurrowHunterKillerUp", 0)), c_orderQueueReplace);
    Wait(3.0, c_timeGame);
    if ((RandomInt(1, 2) == 1)) {
        gf_SetAttackWaveParameters(RegionFromId(5));
    }

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

        for ( ; ( (autoD0B8F7F2_ai >= 0 && lv_i <= autoD0B8F7F2_ae) || (autoD0B8F7F2_ai < 0 && lv_i >= autoD0B8F7F2_ae) ) ; lv_i += autoD0B8F7F2_ai ) {
            if (((UnitIsAlive(gv_ambientOverlords[lv_i].lv_overlord) == false) || (UnitGetOwner(gv_ambientOverlords[lv_i].lv_overlord) == gv_pLAYER_USER))) {
                auto0DBDDF0D_val = RandomInt(1, 7);
                if (auto0DBDDF0D_val == 1) {
                    libNtve_gf_UnitCreateFacingPoint(1, "Overlord", 0, gv_pLAYER_ZERG_SPECIAL, RegionRandomPoint(RegionFromId(5)), PlayerStartLocation(gv_pLAYER_USER));

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

    autoB3EFB1E4_n = libNtve_gf_DifficultyValueInt(50, 60, 60, 70);
    for (autoB3EFB1E4_i = 1; autoB3EFB1E4_i <= autoB3EFB1E4_n; autoB3EFB1E4_i += 1) {
        autoFDB8A229_val = RandomInt(1, 7);
        if (autoFDB8A229_val == 1) {
            libNtve_gf_UnitCreateFacingPoint(1, "Overlord", 0, gv_pLAYER_ZERG_MAIN, RegionRandomPoint(RegionFromId(5)), PlayerStartLocation(gv_pLAYER_USER));

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

        else {
        }
        autoCD7EB0AC_val = RandomInt(1, 3);
        if (autoCD7EB0AC_val == 1) {
            UnitCargoCreate(UnitLastCreated(), "InfestedCivilian", libNtve_gf_DifficultyValueInt(1, 1, 2, 3));