# Tactical AI Filter Life

Grammar — Tactical AI Filter - remove units from filter that have less than min or more than max life
FlagsNative | Action

Sets the specified AI Filter to only include units whose life is within the specified range. 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

  • aifilter — Filter
  • fixed — Min
  • fixed — Max

Returns — void

native void AISetFilterLife(
	aifilter filter,
	fixed min,
	fixed max,
);

Category: AI Advanced / Filters / Actions

# Examples

# campaigns/liberty.sc2campaign

TactCampAI.galaxy

// L612
AISetFilterLife(filter, c_noMin, c_noMax)
// L668
AISetFilterLife(filter, damage*c_minDamageFraction, c_noMax)
// L612
AISetFilterLife(filter, c_noMin, c_noMax)
// L668
AISetFilterLife(filter, damage*c_minDamageFraction, c_noMax)

# mods/core.sc2mod

TactProtAI.galaxy

// L1566
AISetFilterLife(filter, c_aiDisintegrationMinDamage, c_noMax)

# mods/core.sc2mod

TactTerrAI.galaxy

// L52
AISetFilterLife(filter, c_minCannonDamage, c_noMax)
// L1235
AISetFilterLife(filter, damage*c_minDamageFraction, c_noMax)
// L1650
AISetFilterLife(filter, c_minLockOnDamage, c_noMax)

# mods/core.sc2mod

TactZergAI.galaxy

// L492
AISetFilterLife(filter, c_neuralParasiteMinVitality, c_noMax)
// L598
AISetFilterLife(filter, c_noMin, c_noMax)
// L1036
AISetFilterLife(filter, minVitality, c_noMax)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L2134
AISetFilterLife(lv_targetFilter2, lv_autoAttackDamage, 524287.0)
// L2427
AISetFilterLife(lv_primalSlashTargetFilter, lv_abilityDamage, 524287.0)

# mods/starcoop/starcoop.sc2mod

TactCampAI.galaxy

// L1109
AISetFilterLife(filter, damage*c_minDamageFraction, c_noMax)
// L1392
AISetFilterLife(filter, damage*c_minDamageFraction, c_noMax)

# mods/starcoop/starcoop.sc2mod

TactProtAI.galaxy

// L1560
AISetFilterLife(filter, c_aiDisintegrationMinDamage, c_noMax)

# mods/starcoop/starcoop.sc2mod

TactTerrAI.galaxy

// L57
AISetFilterLife(filter, c_minCannonDamage, c_noMax)
// L1207
AISetFilterLife(filter, damage*c_minDamageFraction, c_noMax)
// L1597
AISetFilterLife(filter, c_minLockOnDamage, c_noMax)

# mods/starcoop/starcoop.sc2mod

TactZergAI.galaxy

// L424
AISetFilterLife(filter, c_aiConsumptionTargetMinLife, c_noMax)
// L703
AISetFilterLife(filter, c_neuralParasiteMinVitality, c_noMax)
// L809
AISetFilterLife(filter, c_noMin, c_noMax)
// L1245
AISetFilterLife(filter, minVitality, c_noMax)

# mods/warcoop/warclassicsystem.sc2mod

TacticalAIWar3.galaxy

// L157
AISetFilterLife(filter, 0, maxlife)
// L441
AISetFilterLife(filter, c_noMin, c_noMax)

# mods/warcoop/warclassicsystem.sc2mod

WarClassicTactical.galaxy

// L558
AISetFilterLife(lv_rangeUnitFilter, libGAwT_gv_c_noMin, 100.0)
// L597
AISetFilterLife(lv_rangeUnitFilter, (lv_damage-50), lv_damage)