# Set Target Unit For Attack Waves

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

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

# Arguments

  • int — Attacker
  • unit — Unit

Returns — void

native void AIAttackWaveSetTargetUnit(int player, unit u);

Category: AI / AttackWaves / Actions

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L2103
AIAttackWaveSetTargetUnit(gv_p08_DOMINION_INFANTRY_B, UnitFromId(2))
// L2107
AIAttackWaveSetTargetUnit(gv_p08_DOMINION_INFANTRY_B, UnitFromId(2))
// L2351
AIAttackWaveSetTargetUnit(gv_p05_DOMINION_FACTORY, UnitFromId(2))
// L2354
AIAttackWaveSetTargetUnit(gv_p05_DOMINION_FACTORY, UnitFromId(2))
// L2611
AIAttackWaveSetTargetUnit(gv_p06_DOMINION_STARPORT_A, UnitFromId(2))
// L2617
AIAttackWaveSetTargetUnit(gv_p06_DOMINION_STARPORT_A, UnitFromId(2))
// L2711
AIAttackWaveSetTargetUnit(gv_p06_DOMINION_STARPORT_A, UnitFromId(503))
// L2861
AIAttackWaveSetTargetUnit(gv_p07_DOMINION_STARPORT_B, UnitFromId(2))
// L2866
AIAttackWaveSetTargetUnit(gv_p07_DOMINION_STARPORT_B, UnitFromId(2))
// L2103
AIAttackWaveSetTargetUnit(gv_p08_DOMINION_INFANTRY_B, UnitFromId(2))
// L2107
AIAttackWaveSetTargetUnit(gv_p08_DOMINION_INFANTRY_B, UnitFromId(2))
// L2351
AIAttackWaveSetTargetUnit(gv_p05_DOMINION_FACTORY, UnitFromId(2))
// L2354
AIAttackWaveSetTargetUnit(gv_p05_DOMINION_FACTORY, UnitFromId(2))
// L2611
AIAttackWaveSetTargetUnit(gv_p06_DOMINION_STARPORT_A, UnitFromId(2))
// L2617
AIAttackWaveSetTargetUnit(gv_p06_DOMINION_STARPORT_A, UnitFromId(2))
// L2711
AIAttackWaveSetTargetUnit(gv_p06_DOMINION_STARPORT_A, UnitFromId(503))
// L2861
AIAttackWaveSetTargetUnit(gv_p07_DOMINION_STARPORT_B, UnitFromId(2))
// L2866
AIAttackWaveSetTargetUnit(gv_p07_DOMINION_STARPORT_B, UnitFromId(2))
// L4321
AIAttackWaveSetTargetUnit(gv_pLAYER_02_DOMINION, gv_kerrigan)
// L4389
AIAttackWaveSetTargetUnit(gv_pLAYER_02_DOMINION, gv_kerrigan)
// L6802
AIAttackWaveSetTargetUnit(auto44131E42_var, gf_AITargetNextHut(ge_AttackVector_East))
// L6839
AIAttackWaveSetTargetUnit(auto0E2346E5_var, gf_AITargetNextHut(ge_AttackVector_East))
// L6874
AIAttackWaveSetTargetUnit(auto5DE73C9D_var, gf_AITargetNextHut(ge_AttackVector_West))
// L6909
AIAttackWaveSetTargetUnit(auto1C933212_var, gf_AITargetNextHut(ge_AttackVector_East))
// L1383
AIAttackWaveSetTargetUnit(gv_pLAYER_02_BRAKK, gv_kerrigan)
// L4321
AIAttackWaveSetTargetUnit(gv_pLAYER_02_DOMINION, gv_kerrigan)
// L4389
AIAttackWaveSetTargetUnit(gv_pLAYER_02_DOMINION, gv_kerrigan)
// L6802
AIAttackWaveSetTargetUnit(auto44131E42_var, gf_AITargetNextHut(ge_AttackVector_East))
// L6839
AIAttackWaveSetTargetUnit(auto0E2346E5_var, gf_AITargetNextHut(ge_AttackVector_East))
// L6874
AIAttackWaveSetTargetUnit(auto5DE73C9D_var, gf_AITargetNextHut(ge_AttackVector_West))
// L6909
AIAttackWaveSetTargetUnit(auto1C933212_var, gf_AITargetNextHut(ge_AttackVector_East))
// L1383
AIAttackWaveSetTargetUnit(gv_pLAYER_02_BRAKK, gv_kerrigan)
// L3693
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L3742
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L3841
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L3943
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4000
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4109
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4164
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4339
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4392
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4462
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L637
AIAttackWaveSetTargetUnit(lp_pLAYER, gv_kERRIGAN)
// L4221
AIAttackWaveSetTargetUnit(gv_pLAYER_02_DOMINION4, gv_kERRIGAN)
// L4404
AIAttackWaveSetTargetUnit(gv_pLAYER_02_DOMINION4, gv_kERRIGAN)
// L948
AIAttackWaveSetTargetUnit(gv_pLAYER_04_AMON, gv_kerrigan)
// L3693
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L3742
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L3841
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L3943
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4000
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4109
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4164
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4339
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4392
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L4462
AIAttackWaveSetTargetUnit(gv_zergBase[lv_attackingZergBase].lv_basePlayer, gv_purifierCoreMatrix)
// L637
AIAttackWaveSetTargetUnit(lp_pLAYER, gv_kERRIGAN)
// L4221
AIAttackWaveSetTargetUnit(gv_pLAYER_02_DOMINION4, gv_kERRIGAN)
// L4404
AIAttackWaveSetTargetUnit(gv_pLAYER_02_DOMINION4, gv_kERRIGAN)
// L948
AIAttackWaveSetTargetUnit(gv_pLAYER_04_AMON, gv_kerrigan)
// L1712
AIAttackWaveSetTargetUnit(gv_pLAYER_03_INFESTED_NOFIGHTPROTOSS, gv_terrazineTankLocations[lp_terrazineTankIndex].lv_terrazineTankUnit)
// L1979
AIAttackWaveSetTargetUnit(gv_pLAYER_03_INFESTED_NOFIGHTPROTOSS, gv_terrazineTankLocations[lp_terrazineTankIndex].lv_terrazineTankUnit)
// L2794
AIAttackWaveSetTargetUnit(gv_pLAYER_04_PROTOSS_WAVES, gv_terrazineTankLocations[lv_terrazineTankTargetIndex].lv_terrazineTankUnit)
// L1712
AIAttackWaveSetTargetUnit(gv_pLAYER_03_INFESTED_NOFIGHTPROTOSS, gv_terrazineTankLocations[lp_terrazineTankIndex].lv_terrazineTankUnit)
// L1979
AIAttackWaveSetTargetUnit(gv_pLAYER_03_INFESTED_NOFIGHTPROTOSS, gv_terrazineTankLocations[lp_terrazineTankIndex].lv_terrazineTankUnit)
// L2794
AIAttackWaveSetTargetUnit(gv_pLAYER_04_PROTOSS_WAVES, gv_terrazineTankLocations[lv_terrazineTankTargetIndex].lv_terrazineTankUnit)