# Get Offense Gather Location

Grammar — Get the default offensive gather location for town town of player player
FlagsNative | Function

Returns the default offensive gather location for a town of a player.

# Arguments

  • int — Player
  • int — Town

Returns — point

native point AIGetGatherLocation(int player, int town);

Category: AI Advanced / Towns / Functions

# Examples

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

    AISetBullyAttackWavePercent(AICampaignDiffSelect(player, 100, 100, 50, 0), player);

    AIAttackWaveSetGatherPoint(player, AIGetGatherLocation(player, c_townMain));
    
    AISetDifficulty(player, c_diffPressForward,         true);

mods/core.sc2modbase.sc2data/TriggerLibs/MeleeAI.galaxy:256

//--------------------------------------------------------------------------------------------------
void AIMergeUnit (int player, unit u, wave w) {
    wave merge = AIWaveCreate(AIWaveInfoCreate(), player, AIGetGatherLocation(player, c_townMain));
    AIWaveAddUnit(merge, u);
    AIWaveSetType(merge, c_waveStateMerge, AIWaveTargetMerge(w));

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

    }

    if (!AIFindDropAttackTarget(player, AIGetGatherLocation(player, c_townMain))) {
        return false;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:624

    }

    targetPoint = AIGetGatherLocation(player, c_townMain);
    if (targetPoint == null) {
        return null;

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

	AISetBullyAttackWavePercent(0, player);

    AIAttackWaveSetGatherPoint(player, AIGetGatherLocation(player, c_townMain));
    
														//Unifying all AI Difficulty flags to remove variance

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/MeleeAI.galaxy:256

//--------------------------------------------------------------------------------------------------
void AIMergeUnit (int player, unit u, wave w) {
    wave merge = AIWaveCreate(AIWaveInfoCreate(), player, AIGetGatherLocation(player, c_townMain));
    AIWaveAddUnit(merge, u);
    AIWaveSetType(merge, c_waveStateMerge, AIWaveTargetMerge(w));

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:603

    }

    targetPoint = AIGetGatherLocation(player, c_townMain);
    if (targetPoint == null) {
        return null;

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

    }

    if (!AIFindDropAttackTarget(player, AIGetGatherLocation(player, c_townMain))) {
        return false;
    }