# Tactical AI Filter - Run

Grammar — Create a new unit group by running filter on candidates
FlagsNative | Function

Use a tactical AI filter to trim a unit group and return a new one.

# Arguments

  • aifilter — Filter
  • unitgroup — Candidates

Returns — unitgroup

native unitgroup AIGetFilterGroup(
	aifilter filter,
	unitgroup group,
);

Category: AI Advanced / Filters / Functions

# Examples

# campaigns/liberty.sc2campaign

TactCampAI.galaxy

// L246
AIGetFilterGroup(filter, scanGroup)
// L442
AIGetFilterGroup(filter, scanGroup)
// L533
AIGetFilterGroup(enemyFilter, enemyGroup)
// L564
AIGetFilterGroup(filter, scanGroup)
// L617
AIGetFilterGroup(filter, scanGroup)
// L672
AIGetFilterGroup(filter, scanGroup)
// L677
AIGetFilterGroup(filter, scanGroup)
// L722
AIGetFilterGroup(enemyFilter, enemyGroup)

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L469
AIGetFilterGroup(lv_snipeFilter, lp_candidates)
// L469
AIGetFilterGroup(lv_snipeFilter, lp_candidates)

# campaigns/swarm.sc2campaign

TactCampAI.galaxy

// L246
AIGetFilterGroup(filter, scanGroup)
// L442
AIGetFilterGroup(filter, scanGroup)
// L533
AIGetFilterGroup(enemyFilter, enemyGroup)
// L564
AIGetFilterGroup(filter, scanGroup)
// L617
AIGetFilterGroup(filter, scanGroup)
// L672
AIGetFilterGroup(filter, scanGroup)
// L677
AIGetFilterGroup(filter, scanGroup)
// L722
AIGetFilterGroup(enemyFilter, enemyGroup)
// L847
AIGetFilterGroup(filter, scanGroup)

# mods/core.sc2mod

TactProtAI.galaxy

// L52
AIGetFilterGroup(filterAI, scanGroup)
// L63
AIGetFilterGroup(filterAI, groundEnemies)
// L131
AIGetFilterGroup(filterAI, groundEnemies)
// L514
AIGetFilterGroup(filter, scanGroup)
// L567
AIGetFilterGroup(filterAI, scanGroup)
// L817
AIGetFilterGroup(filter, scanGroup)
// L1085
AIGetFilterGroup (filter, prodGroup)
// L1193
AIGetFilterGroup(filterAI, scanGroup)
// L1223
AIGetFilterGroup(filterAI, scanGroup)
// L1569
AIGetFilterGroup(filter, scanGroup)

# mods/core.sc2mod

TactTerrAI.galaxy

// L66
AIGetFilterGroup(filter, scanGroup)
// L223
AIGetFilterGroup(filterAI, scanGroup)
// L283
AIGetFilterGroup(filterAI, scanGroup)
// L463
AIGetFilterGroup(filter, scanGroup)
// L877
AIGetFilterGroup(filter, nearBunkerGroup)
// L910
AIGetFilterGroup(filter, nearBunkerGroup)
// L1170
AIGetFilterGroup(filter, targetGroup)
// L1190
AIGetFilterGroup(filter, targetGroup)
// L1242
AIGetFilterGroup(filter, scanGroup)
// L1654
AIGetFilterGroup(filter, scanGroup)

# mods/core.sc2mod

TactZergAI.galaxy

// L36
AIGetFilterGroup(filter, group)
// L220
AIGetFilterGroup(filter, scanGroup)
// L312
AIGetFilterGroup(filter, scanGroup)
// L481
AIGetFilterGroup(groundAirFilter, scanGroup)
// L484
AIGetFilterGroup(groundAirFilter, scanGroup)
// L495
AIGetFilterGroup(filter, scanGroup)
// L504
AIGetFilterGroup(filter, targetGroup)
// L535
AIGetFilterGroup(filter, scanGroup)
// L599
AIGetFilterGroup(filter, scanGroup)
// L931
AIGetFilterGroup(filter, scanGroup)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L1986
AIGetFilterGroup(lv_enemyNearbyFilter, lp_nearByUnits)
// L2022
AIGetFilterGroup(lv_enemyNearbyFilter, lp_nearByUnits)
// L2043
AIGetFilterGroup(lv_canidatesFilter, lp_nearByUnits)
// L2104
AIGetFilterGroup(lv_enemyNearbyFilter, lp_nearByUnits)
// L2139
AIGetFilterGroup(lv_targetFilter2, lp_nearByUnits)
// L2179
AIGetFilterGroup(lv_enemyNearbyFilter, lp_nearByUnits)
// L2190
AIGetFilterGroup(lv_targetFilter2, lp_nearByUnits)
// L2192
AIGetFilterGroup(lv_targetFilter2, lp_nearByUnits)
// L2212
AIGetFilterGroup(lv_targetFilter3, lp_nearByUnits)
// L2270
AIGetFilterGroup(lv_enemyNearbyFilter, lp_nearByUnits)

# mods/starcoop/starcoop.sc2mod

TactCampAI.galaxy

// L81
AIGetFilterGroup(filter, nearbyAlliedUnits)
// L223
AIGetFilterGroup(filter, scanGroup)
// L602
AIGetFilterGroup(filter, scanGroup)
// L798
AIGetFilterGroup(filter, scanGroup)
// L889
AIGetFilterGroup(enemyFilter, enemyGroup)
// L920
AIGetFilterGroup(filter, scanGroup)
// L995
AIGetFilterGroup(filter, scanGroup)
// L1058
AIGetFilterGroup(filter, scanGroup)
// L1115
AIGetFilterGroup(filter, scanGroup)
// L1157
AIGetFilterGroup(enemyFilter, enemyGroup)

# mods/starcoop/starcoop.sc2mod

TactProtAI.galaxy

// L53
AIGetFilterGroup(filterAI, scanGroup)
// L64
AIGetFilterGroup(filterAI, groundEnemies)
// L133
AIGetFilterGroup(filterAI, groundEnemies)
// L513
AIGetFilterGroup(filter, scanGroup)
// L549
AIGetFilterGroup(filterAI, scanGroup)
// L1046
AIGetFilterGroup (filter, prodGroup)
// L1152
AIGetFilterGroup(filterAI, scanGroup)
// L1182
AIGetFilterGroup(filterAI, scanGroup)
// L1563
AIGetFilterGroup(filter, scanGroup)

# mods/starcoop/starcoop.sc2mod

TactTerrAI.galaxy

// L71
AIGetFilterGroup(filter, scanGroup)
// L222
AIGetFilterGroup(filterAI, scanGroup)
// L275
AIGetFilterGroup(filterAI, scanGroup)
// L443
AIGetFilterGroup(filter, scanGroup)
// L848
AIGetFilterGroup(filter, nearBunkerGroup)
// L875
AIGetFilterGroup(filter, nearBunkerGroup)
// L1143
AIGetFilterGroup(filter, targetGroup)
// L1163
AIGetFilterGroup(filter, targetGroup)
// L1214
AIGetFilterGroup(filter, scanGroup)
// L1601
AIGetFilterGroup(filter, scanGroup)

# mods/starcoop/starcoop.sc2mod

TactZergAI.galaxy

// L34
AIGetFilterGroup(filter, group)
// L258
AIGetFilterGroup(filter, scanGroup)
// L297
AIGetFilterGroup(filter, scanGroup)
// L384
AIGetFilterGroup(filter, scanGroup)
// L428
AIGetFilterGroup(filter, consumptionTargets)
// L692
AIGetFilterGroup(groundAirFilter, scanGroup)
// L695
AIGetFilterGroup(groundAirFilter, scanGroup)
// L706
AIGetFilterGroup(filter, scanGroup)
// L715
AIGetFilterGroup(filter, targetGroup)
// L746
AIGetFilterGroup(filter, scanGroup)

# mods/warcoop/warclassicsystem.sc2mod

TacticalAIWar3.galaxy

// L144
AIGetFilterGroup(filter, scanGroup)
// L200
AIGetFilterGroup(filterKillable, heroes)