# Rescue Unit Group

Grammar — Rescue unit|Unit for player player and changeColor|Change/Retain Color
FlagsAction

Causes the units in a unit group to be rescued, changing ownership and changing or retaining color.

# Arguments

Returns — void

void libNtve_gf_RescueUnit2(
	unitgroup lp_unit,
	int lp_player,
	bool lp_changeColor,
);

Category: Unit / Basic

# Examples

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

    UnitGroupAddUnitGroup(lv_introHellionGroup, UnitLastCreatedGroup());
    libCamp_gf_CreateDropPod(libCamp_ge_DropPodRace_Terran, PointFromId(930), UnitLastCreatedGroup(), true);
    libNtve_gf_RescueUnit2(lv_introHellionGroup, gv_pLAYER_01_USER, true);
    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "THanson02MusicSwann", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    Wait(3.0, c_timeGame);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson02.sc2mapMapScript.galaxy:2615

    UnitGroupAddUnitGroup(lv_introHellionGroup, UnitLastCreatedGroup());
    libCamp_gf_CreateDropPod(libCamp_ge_DropPodRace_Terran, PointFromId(930), UnitLastCreatedGroup(), true);
    libNtve_gf_RescueUnit2(lv_introHellionGroup, gv_pLAYER_01_USER, true);
    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "THanson02MusicSwann", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    Wait(3.0, c_timeGame);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionbaneling.sc2map/MapScript.galaxy:472

    UnitGroupIssueOrder(lv_group, Order(AbilityCommand("BurrowHunterUp", 0)), c_orderQueueReplace);
    Wait(0.5, c_timeGame);
    libNtve_gf_RescueUnit2(lv_group, gv_pLAYER_01_USER, true);
    UnitGroupAddUnitGroup(gv_hunterPlayerUnitGroup, lv_group);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionzergling.sc2map/MapScript.galaxy:3126

    Wait(1.0, c_timeGame);
    lv_larvaGroup1 = UnitGroup("Larva", gv_pLAYER_01_USER, RegionFromId(21), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    libNtve_gf_RescueUnit2(lv_larvaGroup1, gv_pLAYER_01_USER, true);
    Wait(0.5, c_timeGame);
    lv_larvaGroup2 = UnitGroup("Larva", gv_pLAYER_01_USER, RegionFromId(21), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionzergling.sc2map/MapScript.galaxy:3130

    lv_larvaGroup2 = UnitGroup("Larva", gv_pLAYER_01_USER, RegionFromId(21), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    UnitGroupRemoveUnitGroup(lv_larvaGroup2, lv_larvaGroup1);
    libNtve_gf_RescueUnit2(lv_larvaGroup2, gv_pLAYER_01_USER, true);
    gv_introSwarmlingLarvaAdded2 = true;
    TransmissionWait(TransmissionLastSent(), 0.0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:7854

        }
        libNtve_gf_ShowHideUnit(UnitFromId(975), true);
        libNtve_gf_RescueUnit2(lv_rESCUE_GROUP, gv_pLAYER_01_USER, true);
    }
    else if (auto59A19B1C_val == UnitFromId(414)) {

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:7868

        }
        libNtve_gf_ShowHideUnit(UnitFromId(978), true);
        libNtve_gf_RescueUnit2(lv_rESCUE_GROUP, gv_pLAYER_01_USER, true);
    }
    else if (auto59A19B1C_val == UnitFromId(115)) {

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:7882

        }
        libNtve_gf_ShowHideUnit(UnitFromId(976), true);
        libNtve_gf_RescueUnit2(lv_rESCUE_GROUP, gv_pLAYER_01_USER, true);
    }
    else if (auto59A19B1C_val == UnitFromId(114)) {

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:7896

        }
        libNtve_gf_ShowHideUnit(UnitFromId(977), true);
        libNtve_gf_RescueUnit2(lv_rESCUE_GROUP, gv_pLAYER_01_USER, true);
    }
    else {

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionbaneling.sc2mapMapScript.galaxy:472

    UnitGroupIssueOrder(lv_group, Order(AbilityCommand("BurrowHunterUp", 0)), c_orderQueueReplace);
    Wait(0.5, c_timeGame);
    libNtve_gf_RescueUnit2(lv_group, gv_pLAYER_01_USER, true);
    UnitGroupAddUnitGroup(gv_hunterPlayerUnitGroup, lv_group);
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionzergling.sc2mapMapScript.galaxy:3126

    Wait(1.0, c_timeGame);
    lv_larvaGroup1 = UnitGroup("Larva", gv_pLAYER_01_USER, RegionFromId(21), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    libNtve_gf_RescueUnit2(lv_larvaGroup1, gv_pLAYER_01_USER, true);
    Wait(0.5, c_timeGame);
    lv_larvaGroup2 = UnitGroup("Larva", gv_pLAYER_01_USER, RegionFromId(21), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionzergling.sc2mapMapScript.galaxy:3130

    lv_larvaGroup2 = UnitGroup("Larva", gv_pLAYER_01_USER, RegionFromId(21), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    UnitGroupRemoveUnitGroup(lv_larvaGroup2, lv_larvaGroup1);
    libNtve_gf_RescueUnit2(lv_larvaGroup2, gv_pLAYER_01_USER, true);
    gv_introSwarmlingLarvaAdded2 = true;
    TransmissionWait(TransmissionLastSent(), 0.0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2mapMapScript.galaxy:7854

        }
        libNtve_gf_ShowHideUnit(UnitFromId(975), true);
        libNtve_gf_RescueUnit2(lv_rESCUE_GROUP, gv_pLAYER_01_USER, true);
    }
    else if (auto59A19B1C_val == UnitFromId(414)) {

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2mapMapScript.galaxy:7868

        }
        libNtve_gf_ShowHideUnit(UnitFromId(978), true);
        libNtve_gf_RescueUnit2(lv_rESCUE_GROUP, gv_pLAYER_01_USER, true);
    }
    else if (auto59A19B1C_val == UnitFromId(115)) {

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2mapMapScript.galaxy:7882

        }
        libNtve_gf_ShowHideUnit(UnitFromId(976), true);
        libNtve_gf_RescueUnit2(lv_rESCUE_GROUP, gv_pLAYER_01_USER, true);
    }
    else if (auto59A19B1C_val == UnitFromId(114)) {

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2mapMapScript.galaxy:7896

        }
        libNtve_gf_ShowHideUnit(UnitFromId(977), true);
        libNtve_gf_RescueUnit2(lv_rESCUE_GROUP, gv_pLAYER_01_USER, true);
    }
    else {

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:16328

    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeResourcePanel, true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeSupply, true);
    libNtve_gf_RescueUnit2(gv_protossRescuedUnits, gv_p01_USER, true);
    autoB23625D3_ae = UnitGroupCount(gv_protossProbes, c_unitCountAlive);
    autoB23625D3_ai = 1;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:19239

    }
    gv_protossStartingStalkers = UnitGroup("Stalker", 0, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterUnderConstruction - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    libNtve_gf_RescueUnit2(gv_protossStartingStalkers, gv_p01_USER, true);
    UnitIssueOrder(gv_protossWarpPrism, Order(AbilityCommand("TransportMode", 0)), c_orderQueueReplace);
    Wait(0.5, c_timeGame);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur04.sc2map/MapScript.galaxy:7320

    }
    UnitGroupAddUnitGroup(gv_activePlayerUnits, gv_purifierReinforcements);
    libNtve_gf_RescueUnit2(gv_purifierReinforcements, gv_pLAYER_01_USER, true);
    VisRevealerEnable(gv_hiveCluster1Revealer, false);
    Wait(1.5, c_timeReal);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur04.sc2map/MapScript.galaxy:7701

    TriggerEnable(TriggerGetCurrent(), false);
    UnitGroupAddUnitGroup(gv_activePlayerUnits, gv_darkTemplarReinforcements);
    libNtve_gf_RescueUnit2(gv_darkTemplarReinforcements, gv_pLAYER_01_USER, true);
    VisRevealerEnable(gv_hiveCluster2Revealer, false);
    Wait(1.5, c_timeReal);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:16328

    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeResourcePanel, true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeSupply, true);
    libNtve_gf_RescueUnit2(gv_protossRescuedUnits, gv_p01_USER, true);
    autoB23625D3_ae = UnitGroupCount(gv_protossProbes, c_unitCountAlive);
    autoB23625D3_ai = 1;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:19239

    }
    gv_protossStartingStalkers = UnitGroup("Stalker", 0, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterUnderConstruction - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    libNtve_gf_RescueUnit2(gv_protossStartingStalkers, gv_p01_USER, true);
    UnitIssueOrder(gv_protossWarpPrism, Order(AbilityCommand("TransportMode", 0)), c_orderQueueReplace);
    Wait(0.5, c_timeGame);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur04.sc2mapMapScript.galaxy:7320

    }
    UnitGroupAddUnitGroup(gv_activePlayerUnits, gv_purifierReinforcements);
    libNtve_gf_RescueUnit2(gv_purifierReinforcements, gv_pLAYER_01_USER, true);
    VisRevealerEnable(gv_hiveCluster1Revealer, false);
    Wait(1.5, c_timeReal);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur04.sc2mapMapScript.galaxy:7701

    TriggerEnable(TriggerGetCurrent(), false);
    UnitGroupAddUnitGroup(gv_activePlayerUnits, gv_darkTemplarReinforcements);
    libNtve_gf_RescueUnit2(gv_darkTemplarReinforcements, gv_pLAYER_01_USER, true);
    VisRevealerEnable(gv_hiveCluster2Revealer, false);
    Wait(1.5, c_timeReal);