# Tactical AI Filter Life Modifier
Grammar — Tactical AI Filter - define an altered damage value of amount against attribute in filter
Flags —Native
|Action
Sets the specified AI Filter to modify the way it calculates life values for units with the specified attribute. For example, if the attribute was set to Armored, and the Amount set to 100, then the filter would consider Armored units to have 100 more life than they actually have. This can only be set once per AI Filter, so calling this action multiple times with the same AI Filter will simply override previous calls. 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
— Filterint
<preset::AttributeType> — Attributefixed
— Amount
Returns — void
native void AISetFilterLifeMod(
aifilter filter,
int type,
fixed mod,
);
# 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/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:158
AISetFilterRange(filter, aiUnit, range+3);
AISetFilterLife(filter, 0, maxlife);
AISetFilterLifeMod(filter, c_unitAttributeHeroic,damage*C_spellScaleHeroic-damage);
//AISetFilterLifePerMarker(filter, damage, mark);
//AISetFilterLifeSortReference(filter, damage, damage*c_distanceFromDamage);
mods/warcoop/warclassicsystem.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:442
AISetFilterRange(filter, aiUnit, range);
AISetFilterLife(filter, c_noMin, c_noMax);
AISetFilterLifeMod(filter, c_unitAttributeHeroic,-100);
}else{
AISetFilterBits(filter, UnitFilterStr("Summoned;Player,Ally,Neutral"));