# Tactical AI Filter Life Lost
Grammar — Tactical AI Filter - remove units from filter that have less than min or more than max life lost
Flags —Native
|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
— Filterfixed
— Minfixed
— Max
Returns — void
native void AISetFilterLifeLost(
aifilter filter,
fixed min,
fixed max,
);
# Related
Category: AI Advanced / Filters / Actions
- Tactical AI Filter Alliance —
void
— AISetFilterAlliance - Tactical AI Filter Markers —
void
— AISetFilterMarker - Tactical AI Filter Remove Self —
void
— AISetFilterSelf - Tactical AI Filter Range —
void
— AISetFilterRange - Tactical AI Filter In Combat —
void
— AISetFilterInCombat - Tactical AI Filter Melee —
void
— AISetFilterMelee - Tactical AI Filter Life —
void
— AISetFilterLife - Tactical AI Filter Life Lost —
void
— AISetFilterLifeLost - Tactical AI Filter Life Sort Reference —
void
— AISetFilterLifeSortReference - Tactical AI Filter Life Modifier —
void
— AISetFilterLifeMod - Tactical AI Filter Life Per Marker —
void
— AISetFilterLifePerMarker - Tactical AI Filter Movement Plane —
void
— AISetFilterPlane - Tactical AI Filter Unit Filter —
void
— AISetFilterBits - Tactical AI Filter Shields —
void
— AISetFilterShields - Tactical AI Filter Energy —
void
— AISetFilterEnergy
# Examples
mods/core.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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);