# Order Targeting Unit Group
Grammar — abilCmd targeting units in unitGroup
Flags —Native
|Function
Returns an order targeting a unit group. This is primarily for use in “Issue Order” and “Issue Order To Unit Group” actions.
# Arguments
abilcmd
— Ability Commandunitgroup
— Unit Group
Returns — order
native order OrderTargetingUnitGroup(
abilcmd inAbilCmd,
unitgroup inUnitGroup,
);
# Related
Category: Order / Orders To Be Issued
- Order Targeting Item —
order
— OrderTargetingItem - Order Targeting Point —
order
— OrderTargetingPoint - Revive Order Targeting Point —
order
— libNtve_gf_ReviveOrderTargetingPoint - Order Targeting Relative Points —
order
— OrderTargetingRelativePoint - Order Targeting Unit —
order
— OrderTargetingUnit - Order Targeting Unit Group —
order
— OrderTargetingUnitGroup - Order Targeting Valid Unit In Group —
order
— AIUnitGroupGetValidOrder - Order With No Target —
order
— Order - Revive Order With No Target —
order
— libNtve_gf_ReviveOrderWithNoTarget - Change Autocast Mode —
order
— OrderSetAutoCast - Order Set Target Item —
void
— OrderSetTargetItem - Order Set Target Unit —
void
— OrderSetTargetUnit - Order Set Target Point —
void
— OrderSetTargetPoint - Order Set Target Passenger —
void
— OrderSetTargetPassenger
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:12758
CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
Wait(0.5, c_timeGame);
UnitIssueOrder(gv_hercules, OrderTargetingUnitGroup(AbilityCommand("HerculesTransport", 0), gv_playerUnitGroup), c_orderQueueReplace);
Wait(0.2, c_timeGame);
SoundPlay(SoundLink("Medivac_Load", 0), PlayerGroupAll(), 100.0, 0.0);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/traynor02.sc2map/MapScript.galaxy:1715
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(494)), c_orderQueueAddToEnd);
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(495)), c_orderQueueAddToEnd);
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingUnitGroup(AbilityCommand("attack", 0), UnitGroup("Marine", gv_pLAYER_04_REBELS, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0)), c_orderQueueAddToEnd);
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(gv_medicBarracks)), c_orderQueueAddToEnd);
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(622)), c_orderQueueAddToEnd);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh01.sc2map/MapScript.galaxy:679
lv_mineralGroup = UnitGroup("RichMineralField", c_playerAny, RegionFromId(1), UnitFilter(0, 0, 0, 0), 0);
lv_mineralHarvesters = UnitGroup("SCV", gv_p01_USER, RegionFromId(1), UnitFilter(0, 0, 0, 0), 0);
UnitGroupIssueOrder(lv_mineralHarvesters, OrderTargetingUnitGroup(AbilityCommand("SCVHarvest", 0), lv_mineralGroup), c_orderQueueReplace);
libLbty_gf_OrderWorkerstoGatherNearbyResources(RegionPlayableMap(), gv_p02_ZERG);
libLbty_gf_OrderWorkerstoGatherNearbyResources(RegionPlayableMap(), gv_p04_ZERG);
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/protosspsionics.sc2map/MapScript.galaxy:1172
TriggerEnable(TriggerGetCurrent(), false);
UnitGroupIssueOrder(gv_rockBreakers, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_playerUnits), c_orderQueueReplace);
UnitGroupClear(gv_rockBreakers);
return true;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2map — MapScript.galaxy:12758
CinematicFade(true, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
Wait(0.5, c_timeGame);
UnitIssueOrder(gv_hercules, OrderTargetingUnitGroup(AbilityCommand("HerculesTransport", 0), gv_playerUnitGroup), c_orderQueueReplace);
Wait(0.2, c_timeGame);
SoundPlay(SoundLink("Medivac_Load", 0), PlayerGroupAll(), 100.0, 0.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/traynor02.sc2map — MapScript.galaxy:1715
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(494)), c_orderQueueAddToEnd);
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(495)), c_orderQueueAddToEnd);
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingUnitGroup(AbilityCommand("attack", 0), UnitGroup("Marine", gv_pLAYER_04_REBELS, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0)), c_orderQueueAddToEnd);
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(gv_medicBarracks)), c_orderQueueAddToEnd);
UnitGroupIssueOrder(lv_dominionAttackSquad, OrderTargetingPoint(AbilityCommand("attack", 0), PointFromId(622)), c_orderQueueAddToEnd);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh01.sc2map — MapScript.galaxy:679
lv_mineralGroup = UnitGroup("RichMineralField", c_playerAny, RegionFromId(1), UnitFilter(0, 0, 0, 0), 0);
lv_mineralHarvesters = UnitGroup("SCV", gv_p01_USER, RegionFromId(1), UnitFilter(0, 0, 0, 0), 0);
UnitGroupIssueOrder(lv_mineralHarvesters, OrderTargetingUnitGroup(AbilityCommand("SCVHarvest", 0), lv_mineralGroup), c_orderQueueReplace);
libLbty_gf_OrderWorkerstoGatherNearbyResources(RegionPlayableMap(), gv_p02_ZERG);
libLbty_gf_OrderWorkerstoGatherNearbyResources(RegionPlayableMap(), gv_p04_ZERG);
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/protosspsionics.sc2map — MapScript.galaxy:1172
TriggerEnable(TriggerGetCurrent(), false);
UnitGroupIssueOrder(gv_rockBreakers, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_playerUnits), c_orderQueueReplace);
UnitGroupClear(gv_rockBreakers);
return true;
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/evolution/zevolutionmutalisk.sc2map/MapScript.galaxy:1358
UnitGroupAddUnitGroup(lv_dropUnits, UnitLastCreatedGroup());
libSwaC_gf_CreateDropPod(libSwaC_ge_DropPodRace_Terran, PointFromId(954), lv_dropUnits, true, gv_pLAYER_02_DOMINION);
UnitGroupIssueOrder(lv_dropUnits, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_broodLordsGroup), c_orderQueueReplace);
return true;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/evolution/zevolutionmutalisk.sc2map/MapScript.galaxy:1393
UnitGroupAddUnitGroup(lv_dropUnits, UnitLastCreatedGroup());
libSwaC_gf_CreateDropPod(libSwaC_ge_DropPodRace_Terran, PointFromId(955), lv_dropUnits, true, gv_pLAYER_02_DOMINION);
UnitGroupIssueOrder(lv_dropUnits, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_broodLordsGroup), c_orderQueueReplace);
return true;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/evolution/zevolutionmutalisk.sc2map/MapScript.galaxy:1428
UnitGroupAddUnitGroup(lv_dropUnits, UnitLastCreatedGroup());
libSwaC_gf_CreateDropPod(libSwaC_ge_DropPodRace_Terran, PointFromId(956), lv_dropUnits, true, gv_pLAYER_02_DOMINION);
UnitGroupIssueOrder(lv_dropUnits, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_broodLordsGroup), c_orderQueueReplace);
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionmutalisk.sc2map — MapScript.galaxy:1358
UnitGroupAddUnitGroup(lv_dropUnits, UnitLastCreatedGroup());
libSwaC_gf_CreateDropPod(libSwaC_ge_DropPodRace_Terran, PointFromId(954), lv_dropUnits, true, gv_pLAYER_02_DOMINION);
UnitGroupIssueOrder(lv_dropUnits, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_broodLordsGroup), c_orderQueueReplace);
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionmutalisk.sc2map — MapScript.galaxy:1393
UnitGroupAddUnitGroup(lv_dropUnits, UnitLastCreatedGroup());
libSwaC_gf_CreateDropPod(libSwaC_ge_DropPodRace_Terran, PointFromId(955), lv_dropUnits, true, gv_pLAYER_02_DOMINION);
UnitGroupIssueOrder(lv_dropUnits, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_broodLordsGroup), c_orderQueueReplace);
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionmutalisk.sc2map — MapScript.galaxy:1428
UnitGroupAddUnitGroup(lv_dropUnits, UnitLastCreatedGroup());
libSwaC_gf_CreateDropPod(libSwaC_ge_DropPodRace_Terran, PointFromId(956), lv_dropUnits, true, gv_pLAYER_02_DOMINION);
UnitGroupIssueOrder(lv_dropUnits, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_broodLordsGroup), c_orderQueueReplace);
return true;
}
mods/heroes.stormmod — base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap/MapScript.galaxy:1566
lv_itUnit = UnitGroupUnitFromEnd(auto441AD076_g, auto441AD076_u);
if (lv_itUnit == null) { break; }
UnitIssueOrder(lv_itUnit, OrderTargetingUnitGroup(AbilityCommand("AttackAlly", 0), gv_orderCutsceneUnitGroup), c_orderQueueReplace);
auto9EE22430_ae = UnitGroupCount(gv_orderCutsceneUnitGroup, c_unitCountAlive);
lv_minionIteration = 1;
mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap — MapScript.galaxy:1566
lv_itUnit = UnitGroupUnitFromEnd(auto441AD076_g, auto441AD076_u);
if (lv_itUnit == null) { break; }
UnitIssueOrder(lv_itUnit, OrderTargetingUnitGroup(AbilityCommand("AttackAlly", 0), gv_orderCutsceneUnitGroup), c_orderQueueReplace);
auto9EE22430_ae = UnitGroupCount(gv_orderCutsceneUnitGroup, c_unitCountAlive);
lv_minionIteration = 1;