# Add Unit To Attack Wave

Grammar — Add unit to the next attack wave for player player
FlagsNative | Action

Adds a unit to the next attack wave for a player.

# Arguments

  • int — Player
  • unit — Unit

Returns — void

native void AIAttackWaveUseUnit(int player, unit u);

Category: AI / AttackWaves / Actions

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L411
AIAttackWaveUseUnit(lp_player, lv_u)
// L453
AIAttackWaveUseUnit(gv_p2_ZERG_ORANGE_NW, auto142C38A1_var)
// L3643
AIAttackWaveUseUnit(gv_p2_ZERG_ORANGE_NW, auto56518657_var)
// L4570
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, autoAB0F86D0_var)
// L4655
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, auto4C79756C_var)
// L4725
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, auto823F4E57_var)
// L1413
AIAttackWaveUseUnit(gv_p02_TYCHUS, UnitFromId(2))
// L1679
AIAttackWaveUseUnit(gv_p02_TYCHUS, UnitFromId(2))
// L3757
AIAttackWaveUseUnit(gv_p08_DOMINION, UnitLastCreated())
// L3855
AIAttackWaveUseUnit(gv_p08_DOMINION, UnitLastCreated())
// L4001
AIAttackWaveUseUnit(gv_p08_DOMINION, UnitLastCreated())
// L5898
AIAttackWaveUseUnit(gv_p11_BRUTALISK, gv_brutalisk)
// L9667
AIAttackWaveUseUnit(gv_p04_HYBRID, gv_escapeWarbot)
// L9709
AIAttackWaveUseUnit(gv_p04_HYBRID, gv_hybrid)
// L3683
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, autoBAB1CE6C_var)
// L959
AIAttackWaveUseUnit(gv_p6_FIRST_PROTOSS, UnitFromId(109))
// L842
AIAttackWaveUseUnit(lv_player, UnitLastCreated())
// L860
AIAttackWaveUseUnit(lv_player, UnitLastCreated())
// L1723
AIAttackWaveUseUnit(gv_pLAYER02_PROTOSS, UnitFromId(539))
// L1737
AIAttackWaveUseUnit(gv_pLAYER02_PROTOSS, UnitFromId(539))
// L1220
AIAttackWaveUseUnit(gv_pLAYER_P10_LEVIATHAN, gv_leviathan)
// L1234
AIAttackWaveUseUnit(gv_pLAYER_P10_LEVIATHAN, gv_leviathan)
// L3525
AIAttackWaveUseUnit(gv_pLAYER_ZERG_MAIN, auto8ED32D2A_var)
// L3528
AIAttackWaveUseUnit(gv_pLAYER_ZERG_MAIN, gv_kerrigan)
// L1423
AIAttackWaveUseUnit(gv_p10_HYBRID_MANIFESTATIONS, gv_hybridPhysical)
// L2082
AIAttackWaveUseUnit(gv_p10_HYBRID_MANIFESTATIONS, gv_hybridPhysical)
// L280
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER2, UnitLastCreated())
// L169
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitLastCreated())
// L181
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitLastCreated())
// L193
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitLastCreated())
// L880
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitLastCreated())
// L926
AIAttackWaveUseUnit(gv_p3_ENEMY_PROTOSS, EventUnit())
// L395
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitGroupLoopCurrent())
// L411
AIAttackWaveUseUnit(lp_player, lv_u)
// L453
AIAttackWaveUseUnit(gv_p2_ZERG_ORANGE_NW, auto142C38A1_var)
// L3643
AIAttackWaveUseUnit(gv_p2_ZERG_ORANGE_NW, auto56518657_var)
// L4570
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, autoAB0F86D0_var)
// L4655
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, auto4C79756C_var)
// L4725
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, auto823F4E57_var)
// L1413
AIAttackWaveUseUnit(gv_p02_TYCHUS, UnitFromId(2))
// L1679
AIAttackWaveUseUnit(gv_p02_TYCHUS, UnitFromId(2))
// L3757
AIAttackWaveUseUnit(gv_p08_DOMINION, UnitLastCreated())
// L3855
AIAttackWaveUseUnit(gv_p08_DOMINION, UnitLastCreated())
// L4001
AIAttackWaveUseUnit(gv_p08_DOMINION, UnitLastCreated())
// L5898
AIAttackWaveUseUnit(gv_p11_BRUTALISK, gv_brutalisk)
// L9667
AIAttackWaveUseUnit(gv_p04_HYBRID, gv_escapeWarbot)
// L9709
AIAttackWaveUseUnit(gv_p04_HYBRID, gv_hybrid)
// L3683
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, autoBAB1CE6C_var)
// L959
AIAttackWaveUseUnit(gv_p6_FIRST_PROTOSS, UnitFromId(109))
// L842
AIAttackWaveUseUnit(lv_player, UnitLastCreated())
// L860
AIAttackWaveUseUnit(lv_player, UnitLastCreated())
// L1723
AIAttackWaveUseUnit(gv_pLAYER02_PROTOSS, UnitFromId(539))
// L1737
AIAttackWaveUseUnit(gv_pLAYER02_PROTOSS, UnitFromId(539))
// L1220
AIAttackWaveUseUnit(gv_pLAYER_P10_LEVIATHAN, gv_leviathan)
// L1234
AIAttackWaveUseUnit(gv_pLAYER_P10_LEVIATHAN, gv_leviathan)
// L3525
AIAttackWaveUseUnit(gv_pLAYER_ZERG_MAIN, auto8ED32D2A_var)
// L3528
AIAttackWaveUseUnit(gv_pLAYER_ZERG_MAIN, gv_kerrigan)
// L1423
AIAttackWaveUseUnit(gv_p10_HYBRID_MANIFESTATIONS, gv_hybridPhysical)
// L2082
AIAttackWaveUseUnit(gv_p10_HYBRID_MANIFESTATIONS, gv_hybridPhysical)
// L280
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER2, UnitLastCreated())
// L169
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitLastCreated())
// L181
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitLastCreated())
// L193
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitLastCreated())
// L880
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitLastCreated())
// L926
AIAttackWaveUseUnit(gv_p3_ENEMY_PROTOSS, EventUnit())
// L395
AIAttackWaveUseUnit(gv_pLAYER_COMPUTER1, UnitGroupLoopCurrent())
// L1874
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, UnitGroupLoopCurrent())
// L1990
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, UnitGroupLoopCurrent())
// L2637
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, gv_zagara)
// L3100
AIAttackWaveUseUnit(gv_pLAYER_07_TERRAN_YELLOW, autoB1B923FC_var)
// L2514
AIAttackWaveUseUnit(gv_pLAYER_10_URSADON, UnitFromId(75))
// L2515
AIAttackWaveUseUnit(gv_pLAYER_10_URSADON, UnitFromId(249))
// L2516
AIAttackWaveUseUnit(gv_pLAYER_10_URSADON, UnitFromId(251))
// L3193
AIAttackWaveUseUnit(gv_pLAYER_06_PROTOSS, auto7D4D4406_var)
// L695
AIAttackWaveUseUnit(gv_pLAYER_02_SHUTTLE_BLUE, auto88629E3B_var)
// L577
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, auto8A204714_var)
// L3270
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, lv_sentry01)
// L3272
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, lv_zealot01)
// L4107
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, auto8673C225_var)
// L4122
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, autoC398C246_var)
// L4137
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, auto1F4283D7_var)
// L4152
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, autoEBA732BE_var)
// L6209
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, autoB222EDC9_var)
// L6269
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, auto56424322_var)
// L6317
AIAttackWaveUseUnit(gv_pLAYER_02_ZERG, auto84912346_var)
// L538
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, lv_hybrid)
// L4332
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, auto392DF9EF_var)
// L4396
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, auto44D09FD1_var)
// L637
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, autoE9ECCD06_var)
// L2870
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, autoF6F8F1A5_var)
// L3067
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, autoBA616345_var)
// L4390
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION22, auto7D2366A3_var)
// L4680
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION, autoD8039E92_var)
// L5044
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION22, auto896D738C_var)
// L5055
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION22, auto8DF01D8A_var)
// L5104
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION22, auto22565FDA_var)
// L5159
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION22, auto98E3BD33_var)
// L5178
AIAttackWaveUseUnit(gv_pLAYER_02_DOMINION22, auto0CF5D410_var)
// L6978
AIAttackWaveUseUnit(gv_pLAYER_03_DOMINION_MAIN, auto98739AEF_var)
// L7001
AIAttackWaveUseUnit(gv_pLAYER_03_DOMINION_MAIN, auto84761A07_var)