# Set Target UnitGroup For Attack Waves
Grammar — Set the target for player player attack waves to unitGroup
Flags —Native
|Action
Sets a unit group to be the target of a player’s attack waves.
# Arguments
int
— Attackerunitgroup
— UnitGroup
Returns — void
native void AIAttackWaveSetTargetUnitGroup(
int player,
unitgroup ug,
);
# Related
Category: AI / AttackWaves / Actions
- [F] —
void
— Add Unit To Attack Wave — ( AIAttackWaveUseUnit ) - [F] —
void
— Add Unit Group To Attack Wave — ( AIAttackWaveUseGroup ) - [F] —
void
— Add Escort Unit To Attack Wave — ( AIAttackWaveAddEscortUnit ) - [F] —
void
— Add Escort UnitType To Attack Wave — ( AIAttackWaveAddEscortType ) - [F] —
void
— Add Attack Wave Waypoint — ( AIAttackWaveAddWaypoint ) - [F] —
void
— Send Attack Wave — ( AIAttackWaveSend ) - [F] —
void
— Cancel Attack Wave — ( AIAttackWaveCancel ) - [F] —
void
— Set Attack Wave Gather Point — ( AIAttackWaveSetGatherPoint ) - [F] —
void
— Set Target Player For Attack Waves — ( AIAttackWaveSetTargetPlayer ) - [F] —
void
— Set Target Unit For Attack Waves — ( AIAttackWaveSetTargetUnit ) - [F] —
void
— Set Target UnitGroup For Attack Waves — ( AIAttackWaveSetTargetUnitGroup ) - [F] —
void
— Set Target UnitArea For Attack Waves — ( AIAttackWaveSetTargetUnitPoint ) - [F] —
void
— Set Target Point For Attack Waves — ( AIAttackWaveSetTargetPoint ) - [F] —
void
— Set Target Merge For Attack Waves — ( AIAttackWaveSetTargetMerge ) - [F] —
void
— Set Target Patrol For Attack Waves — ( AIAttackWaveSetTargetPatrol ) - [F] —
void
— Set Target Escort For Attack Waves — ( AIAttackWaveSetTargetEscort ) - [F] —
void
— Set Target Escort For Attack Waves, No Leashing — ( AIAttackWaveSetTargetEscortNL ) - [F] —
void
— Set Target Gather Defense For Attack Waves — ( AIAttackWaveSetTargetGatherD ) - [F] —
void
— Set Target Gather Offense For Attack Waves — ( AIAttackWaveSetTargetGatherO ) - [F] —
void
— Set Target Melee For Attack Waves — ( AIAttackWaveSetTargetMelee ) - [F] —
void
— Set Target Melee Harass For Attack Waves — ( AIAttackWaveSetTargetMeleeHarass ) - [F] —
void
— Set Target Region For Attack/Defense Waves — ( AIAttackWaveSetTargetRegion ) - [F] —
void
— Add Attack Wave Unit Types (Liberty) — ( AIAttackWaveAddUnits4 ) - [F] —
void
— Add Attack Wave Unit Types (Swarm) — ( AIAttackWaveAddUnits3 ) - [F] —
void
— Set Attack Wave Keep Alive — ( AIAttackWaveSetKeepAlive ) - [F] —
void
— Set Attack Wave Gather Early No Replace — ( AIAttackWaveSetGatherEarlyNoReplace )
# Examples
# campaigns/liberty.sc2campaign
// L873
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_COMPUTER1, gv_playerUnits)
// L1815
AIAttackWaveSetTargetUnitGroup(gv_p2_ZERG_ORANGE_NW, gv_colonistsOnTheMove)
// L1816
AIAttackWaveSetTargetUnitGroup(gv_p3_ZERG_LIGHTBLUE_SE, gv_colonistsOnTheMove)
// L9665
AIAttackWaveSetTargetUnitGroup(gv_p09_NEUTRAL_ATTACK, gv_hybridUnitGroup)
// L9707
AIAttackWaveSetTargetUnitGroup(gv_p04_HYBRID, gv_playerGroupforAI)
// L1815
AIAttackWaveSetTargetUnitGroup(gv_p2_ZERG_ORANGE_NW, gv_colonistsOnTheMove)
// L1816
AIAttackWaveSetTargetUnitGroup(gv_p3_ZERG_LIGHTBLUE_SE, gv_colonistsOnTheMove)
// L9665
AIAttackWaveSetTargetUnitGroup(gv_p09_NEUTRAL_ATTACK, gv_hybridUnitGroup)
// L9707
AIAttackWaveSetTargetUnitGroup(gv_p04_HYBRID, gv_playerGroupforAI)
// L873
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_COMPUTER1, gv_playerUnits)
// L580
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L3273
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L4109
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L4124
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L4139
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L4154
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L6211
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L6271
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L6319
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L6440
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L2968
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_06_INFESTED, gv_sneakAttackTerranBase)
// L580
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L3273
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L4109
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L4124
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L4139
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L4154
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L6211
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L6271
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L6319
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L6440
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_02_ZERG, UnitGroup(null, gv_pLAYER_01_USER, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0))
// L2968
AIAttackWaveSetTargetUnitGroup(gv_pLAYER_06_INFESTED, gv_sneakAttackTerranBase)