# Tactical AI Filter Life Lost

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

Sets the specified AI Filter to only include units whose life lost 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 AISetFilterLifeLost(
	aifilter filter,
	fixed min,
	fixed max,
);

Category: AI Advanced / Filters / Actions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:35

    AISetFilterAlliance(filter, c_playerGroupAlly);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterLifeLost(filter, AIEffectFixed(player, c_EF_Transfusion, c_fieldEffectChange0) - 20, c_noMax);
    group = AIGetFilterGroup(filter, group);
    if (group == null) {

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

    AISetFilterAlliance(filter, c_playerGroupAlly);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterLifeLost(filter, AIEffectFixed(player, c_EF_Transfusion, c_fieldEffectChange0) - 20, c_noMax);
    group = AIGetFilterGroup(filter, group);
    if (group == null) {

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:33

    AISetFilterAlliance(filter, c_playerGroupAlly);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterLifeLost(filter, AIEffectFixed(player, c_EF_Transfusion, c_fieldEffectChange0) - 20, c_noMax);
    group = AIGetFilterGroup(filter, group);
    if (group == null) {

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:361

	filter = AIFilter(player);
	AISetFilterAlliance(filter, c_playerGroupAlly);
	AISetFilterLifeLost(filter, amount, c_noMax);
	group = AIGetFilterGroup(filter, group);
    if (group == null) {

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/WarClassicTactical.galaxy:569

    AISetFilterAlliance(lv_rangeUnitFilter, c_playerGroupAlly);
    AISetFilterAlliance(lv_rangeUnitFilter, c_playerGroupAlly);
    AISetFilterLifeLost(lv_rangeUnitFilter, lv_heal, libGAwT_gv_c_noMax);
    lv_unitsInRangeFriend = AIGetFilterGroup(lv_rangeUnitFilter, lv_unitsInRange);
    lv_orderFinal = AIUnitGroupGetValidOrder(lv_unitsInRangeFriend, lv_order, lp_aIUnit, true);