# Tactical AI Filter Energy
Grammar — Tactical AI Filter - remove units from filter that have less than min or more than max energy
Flags —Native
|Action
Sets the specified AI Filter to only include units whose energy 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 AISetFilterEnergy(
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/TactProtAI.galaxy:814
AISetFilterRange(filter, aiUnit, AIAbilityFixed(player, c_AB_Feedback, c_fieldRange0) + 1);
AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
AISetFilterEnergy(filter, minEnergy, c_noMax);
// Pick a valid target