# AIPathDistToNearestFriendlyStructure
Flags —
Native
# Arguments
int
— playerpoint
— locbool
— onlyDropoffs
Returns — int
native int AIPathDistToNearestFriendlyStructure(
int player,
point loc,
bool onlyDropoffs,
);
# Related
Category: Unclassified
# Examples
mods/core.sc2mod — base.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.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:623
leaderPos = UnitGetPosition(leader);
distEnemy = AIPathDistToNearestKnownEnemyStructure(player, leaderPos, true);
distFriend = AIPathDistToNearestFriendlyStructure(player, leaderPos, true);
if (AIWaveGetTimeInCombat(w) > 0) {