# AINearbyPlaneTest

FlagsNative

# Arguments

  • point — p
  • int — player
  • fixed — range
  • int — inPlane
  • int — inAlliance

Returns — bool

native bool AINearbyPlaneTest(
	point p,
	int player,
	fixed range,
	int inPlane,
	int inAlliance,
);

Category: Unclassified

# Examples

campaigns/liberty.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:524

        return null;
    }
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_HybridAoEStun, c_fieldRange0), c_planeAir, c_unitAllianceAlly);

    filter = UnitFilterStr(AIEffectStr(player, c_EF_HybridStunArea, c_fieldFilters));

campaigns/liberty.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:615


    //  Check for air allies.
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_GravitonPrison, c_fieldRange0), c_planeAir, c_unitAllianceAlly);
    AISetFilterCanAttackAlly(filter, c_groundAlliesNearby, airAllies);
    enemyGroup = AIGetFilterGroup(filter, scanGroup);

campaigns/liberty.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:674

        nonHostileBuildings = AIGetFilterGroup(filter, scanGroup);

        airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_PlasmaBlast, c_fieldRange0), c_planeAir, c_unitAllianceAlly);
        AISetFilterCanAttackAlly(filter, c_groundAlliesNearby, airAllies);
    }

campaigns/liberty.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:712

                        AIEffectFixed(player, c_EF_ShockWavePersistent, c_fieldPeriodCount)) );

    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, psiShockRange, c_planeAir, c_unitAllianceAlly);

    filter = UnitFilterStr(AIEffectStr(player, c_EF_PsionicShockWaveArea, c_fieldFilters));

campaigns/swarm.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:524

        return null;
    }
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_HybridAoEStun, c_fieldRange0), c_planeAir, c_unitAllianceAlly);

    filter = UnitFilterStr(AIEffectStr(player, c_EF_HybridStunArea, c_fieldFilters));

campaigns/swarm.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:615


    //  Check for air allies.
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_GravitonPrison, c_fieldRange0), c_planeAir, c_unitAllianceAlly);
    AISetFilterCanAttackAlly(filter, c_groundAlliesNearby, airAllies);
    enemyGroup = AIGetFilterGroup(filter, scanGroup);

campaigns/swarm.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:674

        nonHostileBuildings = AIGetFilterGroup(filter, scanGroup);

        airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_PlasmaBlast, c_fieldRange0), c_planeAir, c_unitAllianceAlly);
        AISetFilterCanAttackAlly(filter, c_groundAlliesNearby, airAllies);
    }

campaigns/swarm.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:712

                        AIEffectFixed(player, c_EF_ShockWavePersistent, c_fieldPeriodCount)) );

    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, psiShockRange, c_planeAir, c_unitAllianceAlly);

    filter = UnitFilterStr(AIEffectStr(player, c_EF_PsionicShockWaveArea, c_fieldFilters));

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:56

    //  Filter out units that can't attack allies since this ability is a disable.
    //
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), 
                                  player, 
                                  AIAbilityFixed(player, c_AB_250mmStrikeCannons, c_fieldRange0), 

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:880

        return null;
    }
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_HybridAoEStun, c_fieldRange0), c_planeAir, c_unitAllianceAlly);

    filter = UnitFilterStr(AIEffectStr(player, c_EF_HybridStunArea, c_fieldFilters));

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1056


    //  Check for air allies.
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_GravitonPrison, c_fieldRange0), c_planeAir, c_unitAllianceAlly);
    AISetFilterCanAttackAlly(filter, c_groundAlliesNearby, airAllies);
    enemyGroup = AIGetFilterGroup(filter, scanGroup);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1112

    AISetFilterLifeSortReference(filter, damage, damage*c_distanceFromDamage);
    
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, "HybridDominatorVoidPlasmaBlast", c_fieldRange0), c_planeAir, c_unitAllianceAlly);
    AISetFilterCanAttackAlly(filter, c_groundAlliesNearby, airAllies);
    

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1147

                        AIEffectFixed(player, c_EF_ShockWavePersistent, c_fieldPeriodCount)) );

    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, psiShockRange, c_planeAir, c_unitAllianceAlly);

    filter = UnitFilterStr(AIEffectStr(player, c_EF_PsionicShockWaveArea, c_fieldFilters));

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1398

        nonHostileBuildings = AIGetFilterGroup(filter, scanGroup);

        airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), player, AIAbilityFixed(player, c_AB_HybridPhaseShift, c_fieldRange0), c_planeAir, c_unitAllianceAlly);
        AISetFilterCanAttackAlly(filter, c_groundAlliesNearby, airAllies);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:61

    //  Filter out units that can't attack allies since this ability is a disable.
    //
    airAllies = AINearbyPlaneTest(UnitGetPosition(aiUnit), 
                                  player, 
                                  AIAbilityFixed(player, c_AB_250mmStrikeCannons, c_fieldRange0),