# AIWaveDetectorCount
Flags —
Native
# Arguments
wave
— w
Returns — int
native int AIWaveDetectorCount(wave w);
# Related
Category: Unclassified
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:323
// first offer it to the attack wave if that wave has some units in it
if (AIWaveUnitCount(attackWave) >= 4) {
if (AIWaveDetectorCount(attackWave) == 0) {
AIWaveAddUnitPriority(attackWave, u, c_prioWavePeon);
return;
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:330
// next offer it to the defense wave
if (AIWaveDetectorCount(defendWave) == 0) {
AIWaveAddUnitPriority(defendWave, u, c_prioWavePeon);
return;
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:344
// let the attack wave claim a second one
if (AIWaveUnitCount(attackWave) >= 4) {
if (AIWaveDetectorCount(attackWave) < 2) {
AIWaveAddUnitPriority(attackWave, u, c_prioWavePeon);
return;
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:323
// first offer it to the attack wave if that wave has some units in it
if (AIWaveUnitCount(attackWave) >= 4) {
if (AIWaveDetectorCount(attackWave) == 0) {
AIWaveAddUnitPriority(attackWave, u, c_prioWavePeon);
return;
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:330
// next offer it to the defense wave
if (AIWaveDetectorCount(defendWave) == 0) {
AIWaveAddUnitPriority(defendWave, u, c_prioWavePeon);
return;
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:344
// let the attack wave claim a second one
if (AIWaveUnitCount(attackWave) >= 4) {
if (AIWaveDetectorCount(attackWave) < 2) {
AIWaveAddUnitPriority(attackWave, u, c_prioWavePeon);
return;