# AIPathDistToNearestFriendlyStructure

FlagsNative

# Arguments

  • int — player
  • point — loc
  • bool — onlyDropoffs

Returns — int

native int AIPathDistToNearestFriendlyStructure(
	int player,
	point loc,
	bool onlyDropoffs,
);

Category: Unclassified

# Examples

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

    leaderPos = UnitGetPosition(leader);
    distEnemy = AIPathDistToNearestKnownEnemyStructure(player, leaderPos, true);
    distFriend = AIPathDistToNearestFriendlyStructure(player, leaderPos, true);

    if (AIWaveGetTimeInCombat(w) > 0) {

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

    leaderPos = UnitGetPosition(leader);
    distEnemy = AIPathDistToNearestKnownEnemyStructure(player, leaderPos, true);
    distFriend = AIPathDistToNearestFriendlyStructure(player, leaderPos, true);

    if (AIWaveGetTimeInCombat(w) > 0) {