# Combat Diff Flag Special High Priority
Grammar — Perform action action on the combat diffculty flag for player player - Special High Priority
Flags —Native
|Function
When enabled, allows the combat AI to target squishy high damage casters before certain other targets.
# Arguments
int
— Playerint
<preset::AICombatStates> — Action
Returns — bool
native bool AICombatDiffFlagCatSpecialHighPrio(
int player,
int action,
);
# Related
Category: AI Advanced / Tactical / Functions
- Same Command —
bool
— AISameCommand - Last Attacker —
unit
— AILastAttacker - Last Attack —
int
— AILastAttack - Get Wants To Move Status —
bool
— AIControlWantsToMove - Is Ignored By Wave —
bool
— AIIsIgnoredByWave - Is In Combat —
bool
— AIUnitIsInCombat - Get Cloaked Attacker —
point
— AIGetCloakedAttacker - Get Best Target Point On Group —
point
— AIBestTargetPoint - Find Units —
unitgroup
— AIFindUnits - Get Default Combat Priority —
unit
— AIDefaultCombatPriority - Combat Diff Flag Special High Priority —
bool
— AICombatDiffFlagCatSpecialHighPrio - Combat Diff Flag Splash High Priority —
bool
— AICombatDiffFlagCatSplashHighPrio - Combat Diff Flag Timed Low Priority —
bool
— AICombatDiffFlagCatTimedLowPrio - Combat Diff Flag Workers Normal Priority —
bool
— AICombatDiffFlagCatWorkersNormalPrio - Combat Diff Flag Sort Buildings Priority —
bool
— AICombatDiffFlagCatSortBuildingsPrio - Combat Diff Flag Healers —
bool
— AICombatDiffFlagTieBreakHealers - Combat Diff Flag Low Health —
bool
— AICombatDiffFlagTieBreakLowHP - Combat Diff Flag Bonus Damage —
bool
— AICombatDiffFlagTieBreakBonusDamage - Combat Diff Flag Injured —
bool
— AICombatDiffFlagTieBreakInjured - Combat Diff Flag Detector —
bool
— AICombatDiffFlagTieBreakDetector - Combat Diff Flag Siege Range —
bool
— AICombatDiffFlagTieBreakRange - Does Unit Have Tactical Disabled —
bool
— AIIsTacticalDisabled
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:58
// I could condense these flags but speed doesn't matter and this way makes it easier to see & to change the settings
if (isMelee) {
AICombatDiffFlagCatSpecialHighPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_skirMedium, c_combatFlagEnable));
AICombatDiffFlagCatSplashHighPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_skirMedium, c_combatFlagEnable));
AICombatDiffFlagCatTimedLowPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_skirMedium, c_combatFlagEnable));
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:71
}
else {
AICombatDiffFlagCatSpecialHighPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_campExpert, c_combatFlagEnable));
AICombatDiffFlagCatSplashHighPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_campExpert, c_combatFlagEnable));
AICombatDiffFlagCatTimedLowPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_campExpert, c_combatFlagEnable));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:108
// I could condense these flags but speed doesn't matter and this way makes it easier to see & to change the settings
AICombatDiffFlagCatSpecialHighPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_campExpert, c_combatFlagEnable));
AICombatDiffFlagCatSplashHighPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_campExpert, c_combatFlagEnable));
AICombatDiffFlagCatTimedLowPrio (player, AIDiffThreshold(player, c_combatFlagDisable, c_campVirtuoso, c_combatFlagEnable));