# Wave Of Unit
Grammar — Wave of unit
Flags —Native
|Function
Returns the wave a unit belongs to.
# Arguments
unit
— Unit
Returns — wave
native wave AIUnitGetWave(unit u);
# Related
Category: AI / MiscCampaign / Functions
- [F] —
bool
— AI Time Is Paused — ( AITimeIsPaused ) - [F] —
fixed
— Elapsed AI Time — ( AIGetTime ) - [F] —
wave
— Wave Of Unit — ( AIUnitGetWave ) - [F] —
unitgroup
— Units Of Wave — ( AIWaveGetUnits ) - [F] —
unitgroup
— Escorts Of Unit — ( AIGetAllEscorts ) - [F] —
unitgroup
— Escorts Of Unit Group — ( AIGetAllEscortsGroup ) - [F] —
unitgroup
— Units In Waves With Target — ( AIGetUnitsInWavesWithTarget ) - [F] —
bool
— Unit Is Script Controlled — ( AIIsScriptControlled ) - [F] —
bool
— Unit Is Unavailable For Wave Use — ( AIIsNotUsableInWaves ) - [F] —
bool
— Unit Is Suicidal — ( AIIsSuicideUnit ) - [F] —
int
— Difficulty Value (Integer) — ( libNtve_gf_DifficultyValueInt ) - [F] —
fixed
— Difficulty Value (Real) — ( libNtve_gf_DifficultyValueFixed ) - [F] —
string
[ gamelink::Unit ] — Difficulty Value (Unit Type) — ( libNtve_gf_DifficultyValueUnitType ) - [F] —
bool
— Difficulty Is (one) — ( ) - [F] —
bool
— Difficulty Is (two) — ( ) - [F] —
bool
— Difficulty High — ( ) - [F] —
bool
— Difficulty Low — ( ) - [F] —
point
— Random Spawn Point — ( AIRandomSpawnPoint )
# Examples
# campaigns/liberty.sc2campaign
// L394
AIUnitGetWave(UnitGroupLoopCurrent())
// L3669
AIUnitGetWave(EventUnit())
// L3676
AIUnitGetWave(EventUnit())
// L3669
AIUnitGetWave(EventUnit())
// L3676
AIUnitGetWave(EventUnit())
// L394
AIUnitGetWave(UnitGroupLoopCurrent())
// L2631
AIUnitGetWave(gv_zagara)
// L2631
AIUnitGetWave(gv_zagara)
// L473
AIUnitGetWave(auto2439952A_var)
// L2599
AIUnitGetWave(UnitGroupUnit(lv_attackWaveUnits, 1))
// L6289
AIUnitGetWave(autoAA8579C6_var)
// L2926
AIUnitGetWave(autoE0C2EB0B_var)
// L4941
AIUnitGetWave(UnitGroupUnit(UnitGroup(null, gv_pLAYER_03_ARTANIS, gv_voidChasm[1].lv_spawnSafetyRegion, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1))
// L473
AIUnitGetWave(auto2439952A_var)
// L2599
AIUnitGetWave(UnitGroupUnit(lv_attackWaveUnits, 1))
// L6289
AIUnitGetWave(autoAA8579C6_var)
// L2926
AIUnitGetWave(autoE0C2EB0B_var)
// L4941
AIUnitGetWave(UnitGroupUnit(UnitGroup(null, gv_pLAYER_03_ARTANIS, gv_voidChasm[1].lv_spawnSafetyRegion, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1))
# mods/core.sc2mod
// L614
AIUnitGetWave(aiUnit)
// L1499
AIUnitGetWave(aiUnit)
# mods/core.sc2mod
// L505
AIUnitGetWave(aiUnit)
# mods/novastoryassets.sc2mod
// L881
AIUnitGetWave(UnitGroupLoopCurrent())
// L881
AIUnitGetWave(UnitGroupLoopCurrent())
# mods/starcoop/starcoop.sc2mod
// L2120
AIUnitGetWave(lp_aIUnit)
# mods/starcoop/starcoop.sc2mod
// L1579
AIUnitGetWave(aiUnit)
// L1604
AIUnitGetWave(aiUnit)
# mods/starcoop/starcoop.sc2mod
// L593
AIUnitGetWave(aiUnit)
// L1500
AIUnitGetWave(aiUnit)
# mods/starcoop/starcoop.sc2mod
// L485
AIUnitGetWave(aiUnit)
// L1437
AIUnitGetWave(aiUnit)
// L1484
AIUnitGetWave(aiUnit)
// L1629
AIUnitGetWave(aiUnit)
// L1694
AIUnitGetWave(aiUnit)
// L1804
AIUnitGetWave(aiUnit)
// L1833
AIUnitGetWave(aiUnit)
# mods/starcoop/starcoop.sc2mod
// L1557
AIUnitGetWave(aiUnit)
// L1602
AIUnitGetWave(aiUnit)
// L1637
AIUnitGetWave(aiUnit)
# mods/warcoop/warclassicsystem.sc2mod
// L82
AIUnitGetWave(aiUnit)
# mods/warcoop/warcoopdata.sc2mod
// L4015
AIUnitGetWave(EventUnit())
# mods/warcoop/warmeleeai.sc2mod
// L297
AIUnitGetWave(lv_c)