# Units In Waves With Target
Grammar — Units owned by player player in waves targeting waveTarget|Wave Target
Flags —Native
|Function
Returns a group of all the units owned by a player in any waves that are targeting the specified wave target.
# Arguments
int
— Playerwavetarget
— WaveTarget
Returns — unitgroup
native unitgroup AIGetUnitsInWavesWithTarget(
int player,
wavetarget target,
);
# 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
// L1205
AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(100)))
// L1206
AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(1)))
// L1205
AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(100)))
// L1206
AIGetUnitsInWavesWithTarget(gv_p02_ZERG, AIWaveTargetPoint(PointFromId(1)))
// L3663
AIGetUnitsInWavesWithTarget(gv_PLAYER_02_DOMINION_RED, AIWaveTargetPoint(PointFromId(2)))
// L3788
AIGetUnitsInWavesWithTarget(gv_PLAYER_02_DOMINION_RED, AIWaveTargetPoint(PointFromId(2)))
// L3663
AIGetUnitsInWavesWithTarget(gv_PLAYER_02_DOMINION_RED, AIWaveTargetPoint(PointFromId(2)))
// L3788
AIGetUnitsInWavesWithTarget(gv_PLAYER_02_DOMINION_RED, AIWaveTargetPoint(PointFromId(2)))