# Combat Diff Flag Low Health
Grammar — Perform action action on the combat diffculty flag for player player - Low Health
Flags —Native
|Function
When enabled, allows the combat AI to target low health units before certain other targets.
# Arguments
int
— Playerint
[ preset::AICombatStates ] — Action
Returns — bool
native bool AICombatDiffFlagTieBreakLowHP(
int player,
int action,
);
# Related
Category: AI Advanced / Tactical / Functions
- [F] —
bool
— Same Command — ( AISameCommand ) - [F] —
unit
— Last Attacker — ( AILastAttacker ) - [F] —
int
— Last Attack — ( AILastAttack ) - [F] —
bool
— Get Wants To Move Status — ( AIControlWantsToMove ) - [F] —
bool
— Is Ignored By Wave — ( AIIsIgnoredByWave ) - [F] —
bool
— Is In Combat — ( AIUnitIsInCombat ) - [F] —
point
— Get Cloaked Attacker — ( AIGetCloakedAttacker ) - [F] —
point
— Get Best Target Point On Group — ( AIBestTargetPoint ) - [F] —
unitgroup
— Find Units — ( AIFindUnits ) - [F] —
unit
— Get Default Combat Priority — ( AIDefaultCombatPriority ) - [F] —
bool
— Combat Diff Flag Special High Priority — ( AICombatDiffFlagCatSpecialHighPrio ) - [F] —
bool
— Combat Diff Flag Splash High Priority — ( AICombatDiffFlagCatSplashHighPrio ) - [F] —
bool
— Combat Diff Flag Timed Low Priority — ( AICombatDiffFlagCatTimedLowPrio ) - [F] —
bool
— Combat Diff Flag Workers Normal Priority — ( AICombatDiffFlagCatWorkersNormalPrio ) - [F] —
bool
— Combat Diff Flag Sort Buildings Priority — ( AICombatDiffFlagCatSortBuildingsPrio ) - [F] —
bool
— Combat Diff Flag Healers — ( AICombatDiffFlagTieBreakHealers ) - [F] —
bool
— Combat Diff Flag Low Health — ( AICombatDiffFlagTieBreakLowHP ) - [F] —
bool
— Combat Diff Flag Bonus Damage — ( AICombatDiffFlagTieBreakBonusDamage ) - [F] —
bool
— Combat Diff Flag Injured — ( AICombatDiffFlagTieBreakInjured ) - [F] —
bool
— Combat Diff Flag Detector — ( AICombatDiffFlagTieBreakDetector ) - [F] —
bool
— Combat Diff Flag Siege Range — ( AICombatDiffFlagTieBreakRange ) - [F] —
bool
— Does Unit Have Tactical Disabled — ( AIIsTacticalDisabled )
# Examples
# campaigns/liberty.sc2campaign
// L1209
AICombatDiffFlagTieBreakLowHP(PlayerGroupLoopCurrent(), c_combatFlagEnable)
// L1209
AICombatDiffFlagTieBreakLowHP(PlayerGroupLoopCurrent(), c_combatFlagEnable)
# mods/core.sc2mod
// L65
AICombatDiffFlagTieBreakLowHP (player, AIDiffThreshold(player, c_combatFlagDisable, c_skirMedium, c_combatFlagEnable))
// L77
AICombatDiffFlagTieBreakLowHP (player, AIDiffThreshold(player, c_combatFlagDisable, c_campExpert, c_combatFlagEnable))
// L114
AICombatDiffFlagTieBreakLowHP (player, AIDiffThreshold(player, c_combatFlagDisable, c_campExpert, c_combatFlagEnable))