# Wave Unit Count

Grammar — Get the number of units in wave w
FlagsNative | Function

Returns the number of units in a wave.

# Arguments

  • wave — Wave

Returns — int

native int AIWaveUnitCount(wave w);

Category: AI Advanced / Waves / Functions

# Examples

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L4226
AIWaveUnitCount(gv_currentWave)
// L4226
AIWaveUnitCount(gv_currentWave)

# mods/core.sc2mod

MeleeAI.galaxy

// L322
AIWaveUnitCount(attackWave)
// L343
AIWaveUnitCount(attackWave)

# mods/core.sc2mod

MeleeHighAI.galaxy

// L165
AIWaveUnitCount(AIWaveGet(player, c_waveAttack))
// L168
AIWaveUnitCount(AIWaveGet(player, c_waveMain))

# mods/core.sc2mod

MeleeLowAI.galaxy

// L120
AIWaveUnitCount(AIWaveGet(player, c_waveMain))
// L120
AIWaveUnitCount(AIWaveGet(player, c_waveAttack))
// L168
AIWaveUnitCount(AIWaveGet(player, c_waveAttack))
// L171
AIWaveUnitCount(AIWaveGet(player, c_waveMain))

# mods/core.sc2mod

MeleeWaveAI.galaxy

// L58
AIWaveUnitCount(w)
// L155
AIWaveUnitCount(w)
// L226
AIWaveUnitCount(w)
// L349
AIWaveUnitCount(waveClob)
// L356
AIWaveUnitCount(waveAtck)
// L401
AIWaveUnitCount(waveAttack)
// L426
AIWaveUnitCount(waveAttack)
// L758
AIWaveUnitCount(w)
// L758
AIWaveUnitCount(AIWaveGet(player, c_waveMain))
// L806
AIWaveUnitCount(w)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L13111
AIWaveUnitCount(libCOMI_gv_cM_CoopAIPlayer_AttackWaves[lv_playerIter][lv_playerWavesIter])

# mods/starcoop/starcoop.sc2mod

MeleeAI.galaxy

// L322
AIWaveUnitCount(attackWave)
// L343
AIWaveUnitCount(attackWave)

# mods/void.sc2mod

MeleeHighAI.galaxy

// L165
AIWaveUnitCount(AIWaveGet(player, c_waveAttack))
// L168
AIWaveUnitCount(AIWaveGet(player, c_waveMain))

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L2941
AIWaveUnitCount(lp_wave)
// L2948
AIWaveUnitCount(lp_wave)

# mods/warcoop/warmeleeai.sc2mod

MeleeWaveAI.galaxy

// L188
AIWaveUnitCount(w)
// L251
AIWaveUnitCount(w)
// L315
AIWaveUnitCount(w)
// L432
AIWaveUnitCount(waveClob)
// L439
AIWaveUnitCount(waveAtck)
// L491
AIWaveUnitCount(waveAttack)
// L516
AIWaveUnitCount(waveAttack)
// L851
AIWaveUnitCount(w)
// L851
AIWaveUnitCount(AIWaveGet(player, c_waveMain))
// L902
AIWaveUnitCount(w)