# AISetFilterBehaviorCount

FlagsNative

# Arguments

  • aifilter — filter
  • int — minBehavior
  • int — maxBehavior
  • string — behaviorType

Returns — void

native void AISetFilterBehaviorCount(
	aifilter filter,
	int minBehavior,
	int maxBehavior,
	string behaviorType,
);

Category: Unclassified

# Examples

campaigns/liberty.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:721

    enemyFilter = AIFilter(player);
    AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
    AISetFilterBehaviorCount(enemyFilter, c_noBehaviorMin, c_noBehaviorMax, c_BF_PsionicShockwave);
    enemyGroup = AIGetFilterGroup(enemyFilter, enemyGroup);

campaigns/swarm.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:721

    enemyFilter = AIFilter(player);
    AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
    AISetFilterBehaviorCount(enemyFilter, c_noBehaviorMin, c_noBehaviorMax, c_BF_PsionicShockwave);
    enemyGroup = AIGetFilterGroup(enemyFilter, enemyGroup);

campaigns/void.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:843

    // Ensnare units that have not been already marked or has existing behavior
    filter = AIFilter(player);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_AB_QueenMPEnsnare);
    //AISetFilterLifePerMarker(filter, damage, mark);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:566

    AISetFilterPlane(filterAI, c_planeGround);
    AISetFilterCanAttackAlly(filterAI, c_groundAlliesNearby, false);
    AISetFilterBehaviorCount(filterAI, c_noBehaviorMin, c_noBehaviorMax, c_BF_TemporalField);
    meleeEnemyGroup = AIGetFilterGroup(filterAI, scanGroup);

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1084

    filter = AIFilter(player);
    AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, chrono, c_fieldTargetFiltersAB)));
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_TimeWarp);
    prodGroup = AIGetFilterGroup (filter, prodGroup);
    if (prodGroup == null) {

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1563

    filter = AIFilter(player);
    AISetFilterAlliance(filter, c_playerGroupEnemy);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Disintegration);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_Disintegration, c_fieldTargetFiltersAB)));

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:219

    AISetFilterMelee(filter, c_onlyRanged);
    AISetFilterPlane(filter, c_planeGround);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_ViperCloudBuff);
    rangedGroup = AIGetFilterGroup(filter, scanGroup);

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:310

    filter = AIFilter(player);
    AISetFilterPlane(filter, c_planeAir);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_ViperParasiticBomb);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    airGroup = AIGetFilterGroup(filter, scanGroup);

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:533

    //  Cast on strongest enemy that can attack our allies
    filter = AIFilter(player);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_FungalGrowth);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, gameMark);
    enemyGroup = AIGetFilterGroup(filter, scanGroup);

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:964

    filter = AIFilter(player);
    AISetFilterAlliance(filter, c_playerGroupEnemy);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Contaminate);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_Contaminate, c_fieldTargetFiltersAB)));

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1037

    AISetFilterAlliance(filter, c_playerGroupEnemy);
    AISetFilterLife(filter, minVitality, c_noMax);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Corruption);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_Corruption, c_fieldTargetFiltersAB)));

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:79

	filter = AIFilter(player);
	AISetFilterPlane(filter, c_planeGround);
	AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_DefilerDarkSwarm);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
	nearbyAlliedUnits = AIGetFilterGroup(filter, nearbyAlliedUnits);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:219

    // Ensnare units that have not been already marked or has existing behavior
    filter = AIFilter(player);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_AB_QueenMPEnsnare);
    //AISetFilterLifePerMarker(filter, damage, mark);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1156

    enemyFilter = AIFilter(player);
    AISetFilterCanAttackAlly(enemyFilter, c_groundAlliesNearby, airAllies);
    AISetFilterBehaviorCount(enemyFilter, c_noBehaviorMin, c_noBehaviorMax, c_BF_PsionicShockwave);
    enemyGroup = AIGetFilterGroup(enemyFilter, enemyGroup);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1684

    
    filter = AIFilter(player);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, "Irradiate");
    AISetFilterBits(filter, UnitFilterStr("Biological;Heroic,Structure,Missile,Stasis,Item,Dead,Hidden,Invulnerable"));	
	irradiateGroup = AIGetFilterGroup(filter, scanGroup);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:548

    AISetFilterPlane(filterAI, c_planeGround);
    AISetFilterCanAttackAlly(filterAI, c_groundAlliesNearby, false);
    AISetFilterBehaviorCount(filterAI, c_noBehaviorMin, c_noBehaviorMax, c_BF_TemporalField);
    meleeEnemyGroup = AIGetFilterGroup(filterAI, scanGroup);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1045

    filter = AIFilter(player);
    AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_ChronoBoost, c_fieldTargetFiltersAB)));
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_TimeWarp);
    prodGroup = AIGetFilterGroup (filter, prodGroup);
    if (prodGroup == null) {

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1557

    filter = AIFilter(player);
    AISetFilterAlliance(filter, c_playerGroupEnemy);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Disintegration);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_Disintegration, c_fieldTargetFiltersAB)));

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

    //AISetFilterMelee(filter, c_onlyRanged);
    AISetFilterPlane(filter, c_planeGround);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_ViperDisablingCloud);
    rangedGroup = AIGetFilterGroup(filter, scanGroup);

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

    AISetFilterMelee(filter, c_onlyRanged);
    AISetFilterPlane(filter, c_planeGround);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_ViperCloudBuff);
    rangedGroup = AIGetFilterGroup(filter, scanGroup);

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

    filter = AIFilter(player);
    AISetFilterPlane(filter, c_planeAir);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_ViperParasiticBomb);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    airGroup = AIGetFilterGroup(filter, scanGroup);

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

    //  Cast on strongest enemy that can attack our allies
    filter = AIFilter(player);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_FungalGrowth);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, gameMark);
    enemyGroup = AIGetFilterGroup(filter, scanGroup);

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

    filter = AIFilter(player);
    AISetFilterAlliance(filter, c_playerGroupEnemy);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Contaminate);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_Contaminate, c_fieldTargetFiltersAB)));

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

    AISetFilterAlliance(filter, c_playerGroupEnemy);
    AISetFilterLife(filter, minVitality, c_noMax);
    AISetFilterBehaviorCount(filter, c_noBehaviorMin, c_noBehaviorMax, c_BF_Corruption);
    AISetFilterMarker(filter, c_noMarkersMin, c_noMarkersMax, mark);
    AISetFilterBits(filter, UnitFilterStr(AIAbilityStr(player, c_AB_Corruption, c_fieldTargetFiltersAB)));

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:437

    filter = AIFilter(player);
    AISetFilterAlliance(filter, c_playerGroupEnemy);
	AISetFilterBehaviorCount(filter,0,0,"ThreatClearer");

	if(chaos){