# Set Targeting Order
Grammar — Set Targeting Order for playerGroup and unitGroup to order and sticky make sticky.
Flags —Native
|Action
Setting the unit group to a unit group other than “null” will enter targeting mode for the specified unit group even if they are not selected. This unit group must remain referenced until targeting is completed. Setting the order to “No Order” will end targeting mode. Setting the order as “sticky” will keep it active until canceled or another order is set.
# Arguments
playergroup
— PlayerGroupunitgroup
— Unit Grouporder
— Orderbool
[ preset::Do_Do_Not_Option ] — Sticky
Returns — void
native void UISetTargetingOrder(
playergroup inPlayers,
unitgroup inUnits,
order inOrder,
bool inSticky,
);
# Related
Category: UI / Game UI
- [F] —
void
— Set Screen Mode — ( UISetMode ) - [F] —
void
— Set Minimum Letterbox Height — ( UISetMinimumLetterboxHeight ) - [F] —
void
— Show/Hide Game UI — ( libNtve_gf_HideGameUI ) - [F] —
void
— Add/Remove UI Frame Type For Global Filter List — ( libNtve_gf_AddRemoveUIFrameTypeForGlobalFilterList ) - [P] — UI Frame Flag
- [F] —
bool
— UI Frame Flag Check — ( libNtve_gf_UIFrameFlagCheck ) - [F] —
void
— For Each UI Frame — ( ) - [F] —
void
— Show/Hide UI Frame — ( UISetFrameVisible ) - [F] —
void
— Set BattleNet Button Offset — ( UISetBattleNetButtonOffset ) - [F] —
void
— Clear BattleNet Button Offset — ( UIClearBattleNetButtonOffset ) - [F] —
bool
— UI Frame Is Visible — ( UIFrameVisible ) - [F] —
void
— Show/Hide World — ( UISetWorldVisible ) - [F] —
void
— Show/Hide Achievement Panel — ( AchievementPanelSetVisible ) - [F] —
void
— Show/Hide Mouse Cursor — ( UISetCursorVisible ) - [F] —
void
— Enable/Disable Mouse Cursor Auto Hide — ( UISetCursorAutoHide ) - [F] —
void
— Enable/Disable Drag Selection — ( UISetDragSelectEnabled ) - [F] —
void
— Set Hot Key Profile — ( UISetHotkeyProfile ) - [F] —
void
— Lock Ally Color Setting — ( UIUnitColorStyleOverride ) - [F] —
void
— Unlock Ally Color Setting — ( UIUnitColorStyleClearOverride ) - [F] —
void
— Lock Flyer Helper Display — ( UIFlyerHelperOverride ) - [F] —
void
— Unlock Flyer Helper Display — ( UIFlyerHelperClearOverride ) - [F] —
void
— Lock Status Bar Display — ( UIStatusBarOverride ) - [F] —
void
— Unlock Status Bar Display — ( UIStatusBarClearOverride ) - [F] —
void
— Set Achievement Toast Style — ( UISetAchievementToastStyle ) - [F] —
void
— Set Minimap Background Color — ( UISetMiniMapBackGroundColor ) - [F] —
void
— Show/Hide Minimap Camera Field of View — ( UISetMiniMapCameraFoVVisible ) - [F] —
void
— Set Minimap Bounds — ( UISetMiniMapBounds ) - [F] —
void
— Enable/Disable Command Type — ( UISetCommandAllowed ) - [F] —
void
— Turn Ability Highlight On/Off — ( UISetButtonHighlighted ) - [F] —
void
— Turn Button Highlight On/Off — ( UISetButtonFaceHighlighted ) - [F] —
void
— Set Command Type Disabled Message — ( UISetCommandDisallowedMessage ) - [F] —
void
— Show/Hide Resource — ( UISetResourceVisible ) - [F] —
void
— Enable/Disable Selection Type — ( UISetSelectionTypeEnabled ) - [F] —
void
— Launch Nydus Link — ( UILaunchNydusLink ) - [F] —
void
— Show/Hide Message Log — ( UIMessageLogPanelSetVisible ) - [F] —
void
— Set Targeting Order — ( UISetTargetingOrder ) - [F] —
void
— Enable/Disable Hotkey — ( UISetHotkeyAllowed ) - [F] —
void
— Target Mode Updated — ( TriggerAddEventTargetModeUpdate ) - [F] —
void
— Resources Requested — ( TriggerAddEventResourceRequest ) - [F] —
void
— Resources Traded — ( TriggerAddEventResourceTrade ) - [F] —
abilcmd
— Target Mode Ability Command — ( EventTargetModeAbilCmd ) - [F] —
int
[ preset::TargetModeState ] — Target Mode State — ( EventTargetModeState ) - [F] —
int
— Resource Requested Amount — ( EventResourceRequestAmount ) - [F] —
int
— Resource Traded Amount — ( EventResourceTradeAmount ) - [F] —
int
— Resource Traded Recipient — ( EventResourceTradeRecipient )
# Examples
# campaigns/voidstory.sc2campaign
— VoidCampaignMissionLib.galaxy
// L479
UISetTargetingOrder(PlayerGroupSingle(1), libVCUI_gv_pU_GPCasterGroup, libVCMI_gv_pM_SoATargetingOrder, false)
// L4577
UISetTargetingOrder(PlayerGroupSingle(1), libVCUI_gv_pU_GPCasterGroup, null, false)
// L4639
UISetTargetingOrder(PlayerGroupSingle(1), libVCMI_gv_pM_SoACasterGroup, libVCMI_gv_pM_SoATargetingOrder, false)
// L4655
UISetTargetingOrder(PlayerGroupSingle(1), libVCMI_gv_pM_SoATargetingDirectionGroup, OrderTargetingPoint(libVCMI_gv_pM_SoATargetingExecuteCommand, UnitGetPosition(libVCMI_gv_pM_SoATargetingUnit[libVCMI_gv_pM_SoATargetingChargesSpent])), false)
// L4704
UISetTargetingOrder(PlayerGroupSingle(1), libVCMI_gv_pM_SoACasterGroup, libVCMI_gv_pM_SoATargetingOrder, false)
// L4765
UISetTargetingOrder(PlayerGroupSingle(1), libVCMI_gv_pM_SoACasterGroup, libVCMI_gv_pM_SoATargetingOrder, false)
// L4796
UISetTargetingOrder(PlayerGroupSingle(1), libVCUI_gv_pU_GPCasterGroup, null, false)
# mods/heroesdata.stormmod
// L16935
UISetTargetingOrder(libCore_gv_playerGroupFromPlayer[lv_deadPlayer], libNtve_gf_ConvertUnitToUnitGroup(lv_deadUnit), null, false)
# mods/heromods/ana.stormmod
// L497
UISetTargetingOrder(PlayerGroupSingle(lv_player), null, OrderTargetingPoint(AbilityCommand("AnaEyeOfHorusAttack", 0), Point(PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint)), PointGetY(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint)))), true)
# mods/starcoop/starcoop.sc2mod
// L7027
UISetTargetingOrder(PlayerGroupSingle(lp_player), libCOMI_gv_cM_SoACasterGroup[lp_player], libCOMI_gv_cM_SoATargetingOrder[lp_player], false)
// L15706
UISetTargetingOrder(PlayerGroupSingle(lv_casterPlayer), libCOMI_gv_cM_GlobalCasterUnitGroup[lv_casterPlayer], OrderTargetingPoint(AbilityCommand("SpawnToxicNest", 0), UnitGetPosition(libCOMI_gv_cM_GlobalCasterUnit[lv_casterPlayer])), false)
// L20530
UISetTargetingOrder(PlayerGroupSingle(EventPlayerEffectUsedUnitOwner(c_effectPlayerOrigin)), libCOMI_gv_cM_GlobalCasterUnitGroup[EventPlayerEffectUsedUnitOwner(c_effectPlayerOrigin)], OrderTargetingPoint(AbilityCommand("HHBomberPlatformAreaBombTopBarOrder", 0), UnitGetPosition(libCOMI_gv_cM_GlobalCasterUnit[EventPlayerEffectUsedUnitOwner(c_effectPlayerOrigin)])), false)
// L20719
UISetTargetingOrder(PlayerGroupSingle(lv_casterPlayer), libCOMI_gv_cM_GlobalCasterUnitGroup[lv_casterPlayer], OrderTargetingPoint(AbilityCommand("HHTrainTopBar", 0), UnitGetPosition(libCOMI_gv_cM_GlobalCasterUnit[lv_casterPlayer])), false)
// L21145
UISetTargetingOrder(PlayerGroupSingle(UnitGetOwner(libCOMI_gv_cM_LaserDrillUnit[lv_player])), libCOMI_gv_cM_LaserDrillUnitGroup[lv_player], OrderTargetingPoint(AbilityCommand("DrakkenLaserDrillBFG", 0), UnitGetPosition(libCOMI_gv_cM_LaserDrillUnit[lv_player])), false)
// L21172
UISetTargetingOrder(PlayerGroupSingle(UnitGetOwner(libCOMI_gv_cM_LaserDrillUnit[lv_player])), libCOMI_gv_cM_LaserDrillUnitGroup[lv_player], OrderTargetingPoint(AbilityCommand("DrakkenLaserDrillNuke", 0), UnitGetPosition(libCOMI_gv_cM_LaserDrillUnit[lv_player])), false)
// L22962
UISetTargetingOrder(lv_pg, libCOMI_gv_cM_NovaGriffinTransportUnitGroup[lv_p], OrderTargetingPoint(AbilityCommand("NovaGriffinTransportUnloadUnits", 0), UnitGetPosition(libCOMI_gv_cM_NovaGriffinTransportUnit[lv_p])), false)
// L24041
UISetTargetingOrder(PlayerGroupSingle(lv_casterPlayer), libCOMI_gv_cM_GlobalCasterUnitGroup[lv_casterPlayer], OrderTargetingPoint(AbilityCommand("DeployPowerTowerStetmann", 0), UnitGetPosition(libCOMI_gv_cM_GlobalCasterUnit[lv_casterPlayer])), false)
// L25567
UISetTargetingOrder(PlayerGroupSingle(UnitGetOwner(libCOMI_gv_cM_TychusMedicTransportUnit[lv_p])), libCOMI_gv_cM_TychusMedicTransportUnitGroup[lv_p], OrderTargetingPoint(AbilityCommand("TychusMedicTransportUnloadUnits", 0), UnitGetPosition(libCOMI_gv_cM_TychusMedicTransportUnit[lv_p])), false)
// L27397
UISetTargetingOrder(PlayerGroupSingle(UnitGetOwner(libCOMI_gv_cM_Zeratul_HeroStructure[lv_player])), libCOMI_gv_cM_Zeratul_HeroStructureUnitGroup[lv_player], OrderTargetingPoint(AbilityCommand("ZeratulMapWideStasis", 0), UnitGetPosition(libCOMI_gv_cM_Zeratul_HeroStructure[lv_player])), false)