# Set Target UnitGroup For Attack Waves

Grammar — Set the target for player player attack waves to unitGroup
FlagsNative | Action

Sets a unit group to be the target of a player’s attack waves.

# Arguments

  • int — Attacker
  • unitgroup — UnitGroup

Returns — void

native void AIAttackWaveSetTargetUnitGroup(
	int player,
	unitgroup ug,
);

Category: AI / AttackWaves / Actions

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// 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)
// 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)