# Tactical AI Filter Remove Self

Grammar — Tactical AI Filter - remove self from filter
FlagsNative | Action

Sets the specified AI Filter to exclude the specified unit. 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
  • unit — Self

Returns — void

native void AISetFilterSelf(aifilter filter, unit exclude);

Category: AI Advanced / Filters / Actions

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1169

    AISetFilterAlliance(filter, c_playerGroupAlly);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterSelf(filter, aiUnit);
    targetGroup = AIGetFilterGroup(filter, targetGroup);

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1189

    AISetFilterAlliance(filter, c_playerGroupAlly);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterSelf(filter, aiUnit);
    targetGroup = AIGetFilterGroup(filter, targetGroup);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1142

    AISetFilterAlliance(filter, c_playerGroupAlly);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterSelf(filter, aiUnit);
    targetGroup = AIGetFilterGroup(filter, targetGroup);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1162

    AISetFilterAlliance(filter, c_playerGroupAlly);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterSelf(filter, aiUnit);
    targetGroup = AIGetFilterGroup(filter, targetGroup);

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

    
    filter = AIFilter(player);
    AISetFilterSelf(filter, aiUnit);
    AISetFilterAlliance(filter, c_playerGroupAlly);
    AISetFilterLife(filter, c_aiConsumptionTargetMinLife, c_noMax);

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

    lv_heal = libGAwT_gf_AIAbilAccumlatedAmount(lp_owner, lp_aIUnit, lp_abil, lv_level, "Heal");
    AISetFilterRange(lv_rangeUnitFilter, lp_aIUnit, lv_range);
    AISetFilterSelf(lv_rangeUnitFilter, lv_itUnit);
    AISetFilterBits(lv_rangeUnitFilter, libGAwT_gf_AIEffectAbilTargetUnitFilter(lp_owner, lp_aIUnit, lp_abil, lv_level));
    lv_unitsInRange = AIGetFilterGroup(lv_rangeUnitFilter, lp_nearByUnits);