# Wave Target Gather Defense

Grammar — Create a new wave target set to gather at the defensive gather point of town town for player player
FlagsNative | Function

Creates a new wave target set to gather at the defensive gather point of the specified town. Returns the wave target.

# Arguments

  • int — Player
  • int — Town

Returns — wavetarget

native wavetarget AIWaveTargetGatherD(
	int player,
	int town,
);

Category: AI Advanced / Waves / Functions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/BaseAI.galaxy:168

    targDPoint = AIWaveTargetGatherDPoint(player, c_townMain);
    targOPoint = AIWaveTargetGatherOPoint(player, c_townMain);
    targD = AIWaveTargetGatherD(player, c_townMain);
    targO = AIWaveTargetGatherMelee(player);

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

        if (AIWaveState(w) != c_waveStateRetreat) {
DebugAIPlayerWave(player, "self defend1 set wave = retreat to gather defense");
            AIWaveSetType(w, c_waveStateRetreat, AIWaveTargetGatherD(player, c_townMain));
        }
    }

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

        if (AIWaveState(w) != c_waveStateRetreat) {
DebugAIPlayerWave(player, "ally defend1 set wave = retreat to gather defense");
            AIWaveSetType(w, c_waveStateRetreat, AIWaveTargetGatherD(player, c_townMain));
        }
    }

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

    if (state == c_waveStateDefend || state == c_waveStateBeacon) {
DebugAIPlayerWave(player, "return to divert control from defend/beacon");
        AIWaveSetType(w, c_waveStateIdle, AIWaveTargetGatherD(player, c_townMain));
        return;
    }

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

    if (state != c_waveStateGuardHome) {
DebugAIPlayerWave(player, "home set divert = idle at gather defense");
        AIWaveSetType(w, c_waveStateGuardHome, AIWaveTargetGatherD(player, c_townMain));
        return;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/BaseAI.galaxy:203

    targDPoint = AIWaveTargetGatherDPoint(player, c_townMain);
    targOPoint = AIWaveTargetGatherOPoint(player, c_townMain);
    targD = AIWaveTargetGatherD(player, c_townMain);
    targO = AIWaveTargetGatherMelee(player);

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

        if (AIWaveState(w) != c_waveStateRetreat) {
DebugAIPlayerWave(player, "defend1 set wave = retreat to gather defense");
            AIWaveSetType(w, c_waveStateRetreat, AIWaveTargetGatherD(player, c_townMain));
        }
    }

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

    else if (AIWaveState(w) != c_waveStateIdle) {
DebugAIPlayerWave(player, "defend3 set defend = idle at gather defense");
        AIWaveSetType(w, c_waveStateIdle, AIWaveTargetGatherD(player, c_townMain));
    }
}

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

    if (state == c_waveStateDefend || state == c_waveStateBeacon) {
DebugAIPlayerWave(player, "return to divert control from defend/beacon");
        AIWaveSetType(w, c_waveStateIdle, AIWaveTargetGatherD(player, c_townMain));
        return;
    }

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

    if (state != c_waveStateGuardHome) {
DebugAIPlayerWave(player, "home set divert = idle at gather defense");
        AIWaveSetType(w, c_waveStateGuardHome, AIWaveTargetGatherD(player, c_townMain));
        return;
    }