# Remove Unit Group From All Waves And Set Home

Grammar — Remove group|Unit Group from all waves and set home to home|Point.
FlagsNative | Action

Removes a group of units from any waves they are in and sets their home point.

# Arguments

  • unitgroup — Group
  • point — Home

Returns — void

native void AIRemoveGroupFromAnyWavesAndSetHome(
	unitgroup ug,
	point home,
);

Category: AI / MiscCampaign / Actions

# Examples

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pulnar01.sc2map/MapScript.galaxy:704

            }
            if ((gf_AttackRegionisValid(lv_attackTargetList[lv_currentValidTarget]) == true)) {
                AIRemoveGroupFromAnyWavesAndSetHome(lv_attackWaveUnits, UnitGroupCenterOfGroup(lv_attackWaveUnits));
                AIAttackWaveSetTargetRegion(lp_player, lv_attackTargetList[lv_currentValidTarget], 0);
                AIAttackWaveSetGatherPoint(lp_player, UnitGroupCenterOfGroup(lv_attackWaveUnits));

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pulnar01.sc2map/MapScript.galaxy:732

        Wait(1.0, c_timeAI);
    }
    AIRemoveGroupFromAnyWavesAndSetHome(lv_attackWaveUnits, UnitGroupCenterOfGroup(lv_attackWaveUnits));
    AIAttackWaveSetTargetPlayer(lp_player, PlayerGroupSingle(gv_pLAYER_01_USER));
    AIAttackWaveSetGatherPoint(lp_player, UnitGroupCenterOfGroup(lv_attackWaveUnits));

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar01.sc2mapMapScript.galaxy:704

            }
            if ((gf_AttackRegionisValid(lv_attackTargetList[lv_currentValidTarget]) == true)) {
                AIRemoveGroupFromAnyWavesAndSetHome(lv_attackWaveUnits, UnitGroupCenterOfGroup(lv_attackWaveUnits));
                AIAttackWaveSetTargetRegion(lp_player, lv_attackTargetList[lv_currentValidTarget], 0);
                AIAttackWaveSetGatherPoint(lp_player, UnitGroupCenterOfGroup(lv_attackWaveUnits));

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar01.sc2mapMapScript.galaxy:732

        Wait(1.0, c_timeAI);
    }
    AIRemoveGroupFromAnyWavesAndSetHome(lv_attackWaveUnits, UnitGroupCenterOfGroup(lv_attackWaveUnits));
    AIAttackWaveSetTargetPlayer(lp_player, PlayerGroupSingle(gv_pLAYER_01_USER));
    AIAttackWaveSetGatherPoint(lp_player, UnitGroupCenterOfGroup(lv_attackWaveUnits));

mods/novastoryassets.sc2modbase2.sc2maps/maps/campaign/nova/nova05.sc2map/MapScript.galaxy:2653

    }
    PingDestroy(libHots_gf_PingStoredForUnit(lv_warpPrismUnit, 1));
    AIRemoveGroupFromAnyWavesAndSetHome(lv_escortGroup, PointFromId(666));
    return true;
}

mods/novastoryassets.sc2mod/base2.sc2maps/maps/campaign/nova/nova05.sc2mapMapScript.galaxy:2653

    }
    PingDestroy(libHots_gf_PingStoredForUnit(lv_warpPrismUnit, 1));
    AIRemoveGroupFromAnyWavesAndSetHome(lv_escortGroup, PointFromId(666));
    return true;
}