# Tactical AI Filter - Create Filter
Grammar — Create AI Filter for player
Flags —Native
|Function
Create an AI filter for use with tactical AI routines.
# Arguments
int
— Player
Returns — aifilter
native aifilter AIFilter(int player);
# Related
Category: AI Advanced / Filters / Functions
- Tactical AI Filter - Create Filter —
aifilter
— AIFilter - Tactical AI Filter - Create Marker
- Tactical AI Filter - Run —
unitgroup
— AIGetFilterGroup
# Examples
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:242
// Search enemies for those with hit points closest to the damage yamato gun inflicts.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterLifePerMarker(filter, damage*0.5, mark);
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:437
// Search enemies for those with hit points closest to the damage BioPlasmidDischarge inflicts.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr("-;Missile,Self,Stasis,Dead,Hidden,Invulnerable"));
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:531
// Only include enemies that can attack our allies.
enemyFilter = AIFilter(player);
AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
enemyGroup = AIGetFilterGroup(enemyFilter, enemyGroup);
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:558
;
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_ConsumeDNA, c_fieldFilters)));
AISetFilterAlliance(filter, c_playerGroupEnemy);
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:610
}
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_GravitonPrison, c_fieldFilters)));
AISetFilterLife(filter, c_noMin, c_noMax);
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:659
// Only target buildings.
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr("Structure;Construction,Missile,Self,Stasis,Dead,Hidden,Invulnerable"));
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:719
// Only care if there are enemies that attack our allies.
enemyFilter = AIFilter(player);
AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
AISetFilterBehaviorCount(enemyFilter, c_noBehaviorMin, c_noBehaviorMax, c_BF_PsionicShockwave);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttosh03a.sc2map/MapScript.galaxy:458
// Variable Initialization
lv_snipeMarker = null;
lv_snipeFilter = AIFilter(lp_owner);
// Implementation
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh03a.sc2map — MapScript.galaxy:458
// Variable Initialization
lv_snipeMarker = null;
lv_snipeFilter = AIFilter(lp_owner);
// Implementation
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:242
// Search enemies for those with hit points closest to the damage yamato gun inflicts.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterLifePerMarker(filter, damage*0.5, mark);
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:437
// Search enemies for those with hit points closest to the damage BioPlasmidDischarge inflicts.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr("-;Missile,Self,Stasis,Dead,Hidden,Invulnerable"));
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:531
// Only include enemies that can attack our allies.
enemyFilter = AIFilter(player);
AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
enemyGroup = AIGetFilterGroup(enemyFilter, enemyGroup);
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:558
;
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_ConsumeDNA, c_fieldFilters)));
AISetFilterAlliance(filter, c_playerGroupEnemy);
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:610
}
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_GravitonPrison, c_fieldFilters)));
AISetFilterLife(filter, c_noMin, c_noMax);
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:659
// Only target buildings.
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr("Structure;Construction,Missile,Self,Stasis,Dead,Hidden,Invulnerable"));
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:719
// Only care if there are enemies that attack our allies.
enemyFilter = AIFilter(player);
AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
AISetFilterBehaviorCount(enemyFilter, c_noBehaviorMin, c_noBehaviorMax, c_BF_PsionicShockwave);
campaigns/void.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:842
// Ensnare units that have not been already marked or has existing behavior
filter = AIFilter(player);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_AB_QueenMPEnsnare);
//AISetFilterLifePerMarker(filter, damage, mark);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:49
// Filter out air units
filterAI = AIFilter(player);
AISetFilterPlane(filterAI, c_planeGround);
AISetFilterCanAttackAlly(filterAI, c_groundAlliesNearby, false);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:61
// Get a list of only melee enemies
filterAI = AIFilter(player);
AISetFilterMelee(filterAI, c_onlyMelee);
meleeEnemyGroup = AIGetFilterGroup(filterAI, groundEnemies);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:129
// filter only ranged units
filterAI = AIFilter(player);
AISetFilterMelee(filterAI, c_onlyRanged);
rangeEnemyGroup = AIGetFilterGroup(filterAI, groundEnemies);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:511
}
filter = AIFilter(player);
AISetFilterInCombat(filter, c_onlyInCombat);
AISetFilterRange(filter, unitToCheck, nearbyRange);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:562
// Filter out air units, non-melee units, and units already in a temporal field
filterAI = AIFilter(player);
AISetFilterMelee(filterAI, c_onlyMelee);
AISetFilterPlane(filterAI, c_planeGround);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:809
}
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_Feedback, c_fieldTargetFiltersAB)));
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1082
}
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, chrono, c_fieldTargetFiltersAB)));
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_TimeWarp);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1191
// Filter out air units
filterAI = AIFilter(player);
AISetFilterPlane(filterAI, c_planeGround);
groundEnemies = AIGetFilterGroup(filterAI, scanGroup);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1221
// Filter out air units
filterAI = AIFilter(player);
AISetFilterPlane(filterAI, c_planeGround);
groundEnemies = AIGetFilterGroup(filterAI, scanGroup);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1561
}
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Disintegration);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:47
;
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_250mmStrikeCannons, c_fieldTargetFiltersAB)));
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:213
damage = AIEffectInt(player, c_EF_SnipeDamage, c_fieldAmount);
filterAI = AIFilter(player);
AISetFilterAlliance(filterAI, c_playerGroupEnemy);
AISetFilterBits(filterAI, UnitFilterStr(AIAbilityStr(player, c_AB_Snipe, c_fieldTargetFiltersAB)));
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:273
damage = AIEffectInt(player, c_EF_SteadyTargetingDamage, c_fieldAmount);
filterAI = AIFilter(player);
AISetFilterAlliance(filterAI, c_playerGroupEnemy);
AISetFilterBits(filterAI, UnitFilterStr(AIAbilityStr(player, c_AB_SteadyTargeting, c_fieldTargetFiltersAB)));
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:458
// Search enemies for those with hit points closest to the damage yamato gun inflicts.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr("-;Missile,Self,Stasis,Dead,Hidden,Invulnerable"));
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:874
nearBunkerGroup = AIFindUnits(player, wanted, UnitGetPosition(aiUnit), c_campaignBunkerLoadRange, c_noMaxCount);
if (wanted == c_nullString) {
filter = AIFilter(player);
AISetFilterMelee(filter, c_onlyRanged);
AISetFilterValidPassenger(filter, aiUnit);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:907
nearBunkerGroup = AIFindUnits(player, wanted, UnitGetPosition(aiUnit), loadRange, c_noMaxCount);
if (wanted == c_nullString) {
filter = AIFilter(player);
AISetFilterMelee(filter, c_onlyRanged);
AISetFilterValidPassenger(filter, aiUnit);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1162
int scanCount;
marker mark = AIMarker(aiUnit, c_MK_D8ChargeFlee);
aifilter filter = AIFilter(player);
unitgroup targetGroup;
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1182
int scanCount;
marker mark = AIMarker(aiUnit, c_MK_KD8ChargeFlee);
aifilter filter = AIFilter(player);
unitgroup targetGroup;
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1231
// Create the filters
//
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_SeekerMissile, c_fieldTargetFiltersAB)));
AISetFilterAlliance(filter, c_playerGroupEnemy);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1643
// Look for a new target
filter = AIFilter(player);
AISetFilterRange(filter, aiUnit, AIAbilityFixed(player, c_AB_LockOn, c_fieldRange0));
if (airOnly == true) {
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:32
;
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupAlly);
AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:216
}
filter = AIFilter(player);
AISetFilterMelee(filter, c_onlyRanged);
AISetFilterPlane(filter, c_planeGround);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:308
}
filter = AIFilter(player);
AISetFilterPlane(filter, c_planeAir);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_ViperParasiticBomb);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:478
enemyAirCount = 0;
groundAirFilter = AIFilter(player);
AISetFilterAlliance(groundAirFilter, c_playerGroupEnemy);
AISetFilterPlane(groundAirFilter, c_planeGround);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:488
// Apply filters to enemies
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_NeuralParasite, c_fieldTargetFiltersAB)));
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:502
// Since it's a missile, we also have to check the game-side marker
//
filter = AIFilter(player);
AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, gameMark);
targetGroup = AIGetFilterGroup(filter, targetGroup);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:532
// Cast on strongest enemy that can attack our allies
filter = AIFilter(player);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_FungalGrowth);
AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, gameMark);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:594
// Cast on top of the weakest unit.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr(AIWeaponStr(player, c_WE_InfestedTerran, c_fieldTargetFilters)));
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:927
}
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterPlane(filter, c_planeGround);
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:962
}
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Contaminate);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:1979
// Variable Initialization
lv_enemiesNearby = UnitGroupEmpty();
lv_enemyNearbyFilter = AIFilter(lp_owner);
lv_enemyUnitsNearby = UnitGroupEmpty();
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2015
// Variable Initialization
lv_enemiesNearby = UnitGroupEmpty();
lv_enemyNearbyFilter = AIFilter(lp_owner);
lv_canidates = UnitGroupEmpty();
lv_canidatesFilter = AIFilter(lp_owner);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2017
lv_enemyNearbyFilter = AIFilter(lp_owner);
lv_canidates = UnitGroupEmpty();
lv_canidatesFilter = AIFilter(lp_owner);
// Implementation
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2097
// Variable Initialization
lv_enemiesNearby = UnitGroupEmpty();
lv_enemyNearbyFilter = AIFilter(lp_owner);
lv_canidates = UnitGroupEmpty();
lv_targetFilter2 = AIFilter(lp_owner);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2099
lv_enemyNearbyFilter = AIFilter(lp_owner);
lv_canidates = UnitGroupEmpty();
lv_targetFilter2 = AIFilter(lp_owner);
// Implementation
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2167
// Variable Initialization
lv_enemiesNearby = UnitGroupEmpty();
lv_enemyNearbyFilter = AIFilter(lp_owner);
lv_friendsNearby = UnitGroupEmpty();
lv_friendsNearbyFilter = AIFilter(lp_owner);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2169
lv_enemyNearbyFilter = AIFilter(lp_owner);
lv_friendsNearby = UnitGroupEmpty();
lv_friendsNearbyFilter = AIFilter(lp_owner);
lv_canidates = UnitGroupEmpty();
lv_harmlessCandidates = UnitGroupEmpty();
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2172
lv_canidates = UnitGroupEmpty();
lv_harmlessCandidates = UnitGroupEmpty();
lv_targetFilter2 = AIFilter(lp_owner);
lv_roachCandidates = UnitGroupEmpty();
lv_targetFilter3 = AIFilter(lp_owner);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2174
lv_targetFilter2 = AIFilter(lp_owner);
lv_roachCandidates = UnitGroupEmpty();
lv_targetFilter3 = AIFilter(lp_owner);
// Implementation
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2260
// Variable Initialization
lv_enemiesNearby = UnitGroupEmpty();
lv_enemyNearbyFilter = AIFilter(lp_owner);
lv_canidates = UnitGroupEmpty();
for (init_i = 0; init_i <= 2; init_i += 1) {
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:77
8, c_noMaxCount);
filter = AIFilter(player);
AISetFilterPlane(filter, c_planeGround);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_DefilerDarkSwarm);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:218
// Ensnare units that have not been already marked or has existing behavior
filter = AIFilter(player);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_AB_QueenMPEnsnare);
//AISetFilterLifePerMarker(filter, damage, mark);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:598
// Search enemies for those with hit points closest to the damage yamato gun inflicts.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterLifePerMarker(filter, damage*0.5, mark);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:793
// Search enemies for those with hit points closest to the damage BioPlasmidDischarge inflicts.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr("-;Missile,Self,Stasis,Dead,Hidden,Invulnerable"));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:887
// Only include enemies that can attack our allies.
enemyFilter = AIFilter(player);
AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
enemyGroup = AIGetFilterGroup(enemyFilter, enemyGroup);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:914
;
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_ConsumeDNA, c_fieldFilters)));
AISetFilterAlliance(filter, c_playerGroupEnemy);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:989
AIEffectFixed(player, c_EF_ConsumeDNADamage, c_fieldAmount);
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_ConsumeDNA, c_fieldTargetFiltersAB)));
AISetFilterAlliance(filter, c_playerGroupEnemy);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1051
}
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr("-;Heroic,Structure,Missile,Stasis,Item,Dead,Hidden,Invulnerable"));
AISetFilterLifePercent(filter, c_noMin, c_noMax);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1103
}
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr("-;Construction,Missile,Self,Stasis,Dead,Hidden,Invulnerable"));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1154
// Only care if there are enemies that attack our allies.
enemyFilter = AIFilter(player);
AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
AISetFilterBehaviorCount(enemyFilter, c_noBehaviorMin, c_noBehaviorMax, c_BF_PsionicShockwave);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:50
// Filter out air units
filterAI = AIFilter(player);
AISetFilterPlane(filterAI, c_planeGround);
AISetFilterCanAttackAlly(filterAI, c_groundAlliesNearby, false);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:62
// Get a list of only melee enemies
filterAI = AIFilter(player);
AISetFilterMelee(filterAI, c_onlyMelee);
meleeEnemyGroup = AIGetFilterGroup(filterAI, groundEnemies);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:131
// filter only ranged units
filterAI = AIFilter(player);
AISetFilterMelee(filterAI, c_onlyRanged);
rangeEnemyGroup = AIGetFilterGroup(filterAI, groundEnemies);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:511
minEnemies = 4;
}
filter = AIFilter(player);
AISetFilterInCombat(filter, c_onlyInCombat);
inCombatEnemies = AIGetFilterGroup(filter, scanGroup);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:544
// Filter out air units, non-melee units, and units already in a temporal field
filterAI = AIFilter(player);
AISetFilterMelee(filterAI, c_onlyMelee);
AISetFilterPlane(filterAI, c_planeGround);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1043
}
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_ChronoBoost, c_fieldTargetFiltersAB)));
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_TimeWarp);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1150
// Filter out air units
filterAI = AIFilter(player);
AISetFilterPlane(filterAI, c_planeGround);
groundEnemies = AIGetFilterGroup(filterAI, scanGroup);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1180
// Filter out air units
filterAI = AIFilter(player);
AISetFilterPlane(filterAI, c_planeGround);
groundEnemies = AIGetFilterGroup(filterAI, scanGroup);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1555
}
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Disintegration);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:52
;
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_250mmStrikeCannons, c_fieldTargetFiltersAB)));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:215
damage = AIEffectInt(player, c_EF_SnipeDamage, c_fieldAmount);
filterAI = AIFilter(player);
AISetFilterAlliance(filterAI, c_playerGroupEnemy);
AISetFilterBits(filterAI, UnitFilterStr("Biological,Visible;Heroic,Self,Structure,Destructible,Stasis,Dead,Hidden,Invulnerable"));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:265
damage = AIEffectInt(player, c_EF_SteadyTargetingDamage, c_fieldAmount);
filterAI = AIFilter(player);
AISetFilterAlliance(filterAI, c_playerGroupEnemy);
AISetFilterBits(filterAI, UnitFilterStr(AIAbilityStr(player, c_AB_SteadyTargeting, c_fieldTargetFiltersAB)));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:438
// Search enemies for those with hit points closest to the damage yamato gun inflicts.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr("-;Heroic,Missile,Stasis,Item,Dead,Hidden,Invulnerable"));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:845
nearBunkerGroup = AIFindUnits(player, wanted, UnitGetPosition(aiUnit), c_campaignBunkerLoadRange, c_noMaxCount);
if (wanted == c_nullString) {
filter = AIFilter(player);
AISetFilterMelee(filter, c_onlyRanged);
AISetFilterValidPassenger(filter, aiUnit);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:872
nearBunkerGroup = AIFindUnits(player, wanted, UnitGetPosition(aiUnit), loadRange, c_noMaxCount);
if (wanted == c_nullString) {
filter = AIFilter(player);
AISetFilterMelee(filter, c_onlyRanged);
AISetFilterValidPassenger(filter, aiUnit);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1135
int scanCount;
marker mark = AIMarker(aiUnit, c_MK_D8ChargeFlee);
aifilter filter = AIFilter(player);
unitgroup targetGroup;
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1155
int scanCount;
marker mark = AIMarker(aiUnit, c_MK_KD8ChargeFlee);
aifilter filter = AIFilter(player);
unitgroup targetGroup;
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1203
// Create the filters
//
filter = AIFilter(player);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_SeekerMissile, c_fieldTargetFiltersAB)));
AISetFilterAlliance(filter, c_playerGroupEnemy);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1590
// Look for a new target
filter = AIFilter(player);
AISetFilterRange(filter, aiUnit, AIAbilityFixed(player, c_AB_LockOn, c_fieldRange0));
if (airOnly == true) {
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:30
;
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupAlly);
AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:254
}
filter = AIFilter(player);
//AISetFilterMelee(filter, c_onlyRanged);
AISetFilterPlane(filter, c_planeGround);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:293
}
filter = AIFilter(player);
AISetFilterMelee(filter, c_onlyRanged);
AISetFilterPlane(filter, c_planeGround);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:380
}
filter = AIFilter(player);
AISetFilterPlane(filter, c_planeAir);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_ViperParasiticBomb);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:421
}
filter = AIFilter(player);
AISetFilterSelf(filter, aiUnit);
AISetFilterAlliance(filter, c_playerGroupAlly);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:689
enemyAirCount = 0;
groundAirFilter = AIFilter(player);
AISetFilterAlliance(groundAirFilter, c_playerGroupEnemy);
AISetFilterPlane(groundAirFilter, c_planeGround);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:699
// Apply filters to enemies
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_NeuralParasite, c_fieldTargetFiltersAB)));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:713
// Since it's a missile, we also have to check the game-side marker
//
filter = AIFilter(player);
AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, gameMark);
targetGroup = AIGetFilterGroup(filter, targetGroup);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:743
// Cast on strongest enemy that can attack our allies
filter = AIFilter(player);
AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_FungalGrowth);
AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, gameMark);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:805
// Cast on top of the weakest unit.
//
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr(AIWeaponStr(player, c_WE_InfestedTerran, c_fieldTargetFilters)));
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:139
return null;
}
filter = AIFilter(player);
//AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_LightningShield, c_fieldTargetFiltersAB)));
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:153
const fixed C_spellScaleHeroic=0.7;
static aifilter AIWar3SpellDamageFilter(int player, unit aiUnit, marker mark, fixed maxlife, unitfilter uf, fixed range, fixed damage){
aifilter filter=AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBits(filter, uf);
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:359
// return AIUnitGroupGetValidOrder(ethereals, ord, aiUnit, c_forwards);
// }
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupAlly);
AISetFilterLifeLost(filter, amount, c_noMax);
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:435
range=UnitWeaponRange(aiUnit,1);
AIWeaponGroup(player, weapon, scanGroup);
filter = AIFilter(player);
AISetFilterAlliance(filter, c_playerGroupEnemy);
AISetFilterBehaviorCount(filter,0,0,"ThreatClearer");