# AIWaveTargetGetUnit
Flags —
Native
# Arguments
wavetarget
— wt
Returns — unit
native unit AIWaveTargetGetUnit(wavetarget wt);
# Related
Category: Unclassified
# Examples
mods/core.sc2mod — base.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.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1441
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
//Units that are Escorting behave differently, if we're an escort then burrow when enemies are nearby
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1488
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
// always unburrow when we are forced to move, unless we are escorting something
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1633
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
// If we're being forced to move, transform back to air mode, unless we are escorting something
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1698
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
// Stay in mobile air mode while force moving, unless we are escorting something
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1808
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
// If we are not escorting something use tactical function
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1837
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
// If we are not escorting something use tactical function
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1561
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
// If we are not escorting something use tactical function
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1606
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
// If we are not escorting something use tactical function
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1641
waveEscortGroup = AIWaveTargetGetUnitGroup(unitWaveTarget);
waveEscortUnit = AIWaveTargetGetUnit(unitWaveTarget);
// If we are not escorting something use tactical function
mods/warcoop/warmeleeai.sc2mod — base.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");