# Wave Get Target

Grammar — Returns the wavetarget for the specified wave wave
FlagsNative | Function

Returns the wave target for the specified wave.

# Arguments

  • wave — Wave

Returns — wavetarget

native wavetarget AIWaveGetTarget(wave w);

Category: AI Advanced / Waves / Functions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeWaveAI.galaxy:313


    // Let's hunt some rock!
    oldTarget = AIWaveTargetGetUnit(AIWaveGetTarget(w));
    if (state != c_waveStateClearObs || obstruction != oldTarget) {
DebugAIPlayerWave(player, "clearobs2 set clear obstruction = clear obstruction");

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1438

    
    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1485

    
    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1630

    }
    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1695


    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1805

    
    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1834

    
    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1558

    
    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1603

    
    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1638

    
    unitWave = AIUnitGetWave(aiUnit);
    unitWaveTarget = AIWaveGetTarget(unitWave);
    
    waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/MeleeWaveAI.galaxy:396


    // Let's hunt some rock!
    oldTarget = AIWaveTargetGetUnit(AIWaveGetTarget(w));
    if (state != c_waveStateClearObs || obstruction != oldTarget) {
DebugAIPlayerWave(player, "clearobs2 set clear obstruction = clear obstruction");