# Order Targeting Unit Group

GrammarabilCmd targeting units in unitGroup
FlagsNative | 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 Command
  • unitgroup — Unit Group

Returns — order

native order OrderTargetingUnitGroup(
	abilcmd inAbilCmd,
	unitgroup inUnitGroup,
);

Category: Order / Orders To Be Issued

# Examples

campaigns/liberty.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.galaxy:1172


    TriggerEnable(TriggerGetCurrent(), false);
    UnitGroupIssueOrder(gv_rockBreakers, OrderTargetingUnitGroup(AbilityCommand("attack", 0), gv_playerUnits), c_orderQueueReplace);
    UnitGroupClear(gv_rockBreakers);
    return true;

campaigns/swarm.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.stormmodbase.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.stormmapMapScript.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;