# Wave Target Gather Offense

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

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

# Arguments

  • int — Player
  • int — Town

Returns — wavetarget

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

Category: AI Advanced / Waves / Functions

# Examples

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

    if (state != c_waveStateIdle) {
DebugAIPlayerWave(player, "main2 set main = idle at gather offense");
        AIWaveSetType(w, c_waveStateIdle, AIWaveTargetGatherO(player, c_townMain));
    }
}

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

    int delay = FixedToInt(AIGetTime()) + RandomInt(60, 90);

    AIWaveSetType(w, c_waveStateIdle, AIWaveTargetGatherO(player, c_townMain));
    AISetUserInt(player, c_delayNextAttack, delay);
    if (state == e_attackState_Wait) {

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

        if (AIWaveState(w) != c_waveStateIdle) {
            DebugAIPlayerWave(player, "turtle set attack = idle at gather offense");
            AIWaveSetType(w, c_waveStateIdle, AIWaveTargetGatherO(player, c_townMain));
        }
        return;

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

DebugAIPlayerWave(player, "attack2 merge main -> attack; set attack = retreat to gather offense");
            AIWaveMerge(player, c_waveMain, c_waveAttack);
            AIWaveSetType(w, c_waveStateRetreat, AIWaveTargetGatherO(player, c_townMain));
        }
        return;

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

    else if (state == e_attackState_Retreat) {        
DebugAIPlayerWave(player, "attack3 set attack = retreat to gather offense");
        AIWaveSetType(w, c_waveStateRetreat, AIWaveTargetGatherO(player, c_townMain));
        AISetAttackState(player, e_attackState_InRetreat);
        return;

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

    else if (state == e_attackState_DropRetreat) {        
DebugAIPlayerWave(player, "attack3drop set attack = drop retreat to gather offense");
        AIWaveSetType(w, c_waveStateDropRetreat, AIWaveTargetGatherO(player, c_townMain));
        AISetAttackState(player, e_attackState_InRetreat);
        return;

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

            if (AIWaveState(w) != c_waveStateIdle) {
                DebugAIPlayerWave(player, "attack5 set attack = idle at gather offense");
                AIWaveSetType(w, c_waveStateIdle, AIWaveTargetGatherO(player, c_townMain));
            }
        }