# Tactical AI Filter Alliance

Grammar — Tactical AI Filter - include only alliance in filter
FlagsNative | Action

Sets the specified AI Filter to only include either enemy or allied units. Use this and the other “Tactical AI Filter” actions to set up an AI Filter, which can then be used in a “Tactical AI Filter - Run” function to filter a unit group.

# Arguments

Returns — void

native void AISetFilterAlliance(aifilter filter, int want);

Category: AI Advanced / Filters / Actions

# Examples

# campaigns/liberty.sc2campaign

TactCampAI.galaxy

// L243
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L438
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L560
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L660
AISetFilterAlliance(filter, c_playerGroupEnemy)

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L465
AISetFilterAlliance(lv_snipeFilter, c_playerGroupEnemy)
// L465
AISetFilterAlliance(lv_snipeFilter, c_playerGroupEnemy)

# campaigns/swarm.sc2campaign

TactCampAI.galaxy

// L243
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L438
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L560
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L660
AISetFilterAlliance(filter, c_playerGroupEnemy)

# mods/core.sc2mod

TactProtAI.galaxy

// L810
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1562
AISetFilterAlliance(filter, c_playerGroupEnemy)

# mods/core.sc2mod

TactTerrAI.galaxy

// L48
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L214
AISetFilterAlliance(filterAI, c_playerGroupEnemy)
// L274
AISetFilterAlliance(filterAI, c_playerGroupEnemy)
// L459
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1167
AISetFilterAlliance(filter, c_playerGroupAlly)
// L1187
AISetFilterAlliance(filter, c_playerGroupAlly)
// L1233
AISetFilterAlliance(filter, c_playerGroupEnemy)

# mods/core.sc2mod

TactZergAI.galaxy

// L33
AISetFilterAlliance(filter, c_playerGroupAlly)
// L479
AISetFilterAlliance(groundAirFilter, c_playerGroupEnemy)
// L489
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L595
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L928
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L963
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1035
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1066
AISetFilterAlliance(filter, c_playerGroupEnemy)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L1984
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L2021
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L2039
AISetFilterAlliance(lv_canidatesFilter, c_playerGroupEnemy)
// L2103
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L2135
AISetFilterAlliance(lv_targetFilter2, c_playerGroupEnemy)
// L2178
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L2185
AISetFilterAlliance(lv_targetFilter2, c_playerGroupEnemy)
// L2269
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L2316
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L2389
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)

# mods/starcoop/starcoop.sc2mod

TactCampAI.galaxy

// L599
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L794
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L916
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L991
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1104
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1384
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1654
AISetFilterAlliance(filter, c_playerGroupAlly)

# mods/starcoop/starcoop.sc2mod

TactProtAI.galaxy

// L1556
AISetFilterAlliance(filter, c_playerGroupEnemy)

# mods/starcoop/starcoop.sc2mod

TactTerrAI.galaxy

// L53
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L216
AISetFilterAlliance(filterAI, c_playerGroupEnemy)
// L266
AISetFilterAlliance(filterAI, c_playerGroupEnemy)
// L439
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1140
AISetFilterAlliance(filter, c_playerGroupAlly)
// L1160
AISetFilterAlliance(filter, c_playerGroupAlly)
// L1205
AISetFilterAlliance(filter, c_playerGroupEnemy)

# mods/starcoop/starcoop.sc2mod

TactZergAI.galaxy

// L31
AISetFilterAlliance(filter, c_playerGroupAlly)
// L423
AISetFilterAlliance(filter, c_playerGroupAlly)
// L690
AISetFilterAlliance(groundAirFilter, c_playerGroupEnemy)
// L700
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L806
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1137
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1172
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1244
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1275
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L1617
AISetFilterAlliance(filter, c_playerGroupEnemy)

# mods/warcoop/warclassicsystem.sc2mod

TacticalAIWar3.galaxy

// L154
AISetFilterAlliance(filter, c_playerGroupEnemy)
// L360
AISetFilterAlliance(filter, c_playerGroupAlly)
// L436
AISetFilterAlliance(filter, c_playerGroupEnemy)

# mods/warcoop/warclassicsystem.sc2mod

WarClassicTactical.galaxy

// L225
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L290
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L352
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy)
// L355
AISetFilterAlliance(lv_friendNearbyFilter, c_playerGroupAlly)
// L557
AISetFilterAlliance(lv_rangeUnitFilter, c_playerGroupAlly)
// L567
AISetFilterAlliance(lv_rangeUnitFilter, c_playerGroupAlly)
// L568
AISetFilterAlliance(lv_rangeUnitFilter, c_playerGroupAlly)
// L589
AISetFilterAlliance(lv_rangeUnitFilter, c_playerGroupEnemy)