# Tactical AI Filter Energy

Grammar — Tactical AI Filter - remove units from filter that have less than min or more than max energy
FlagsNative | 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 — Filter
  • fixed — Min
  • fixed — Max

Returns — void

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

Category: AI Advanced / Filters / Actions

# Examples

mods/core.sc2modbase.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