# Unit Absorbs Damage
Grammar — u absorbs damage with behavior behavior
Flags —Native
|Event
This event fires when a unit absorbs damage due to a behavior damage response. Use “Triggering Unit” to get the unit that absorbed damage. Use “Triggering Behavior” to get the behavior that absorbed damage on the unit. Use “Triggering Damage Absorbed” to get the amount of damage absorbed. Use “Damaging Unit” and “Damaging Player” to get the unit and player that caused the damage. Use “Damaging Effect” to get the effect that caused the damage.
# Arguments
unitref
[ unit ] — Unitstring
[ gamelink::Behavior ] — Behavior
Returns — void
native void TriggerAddEventUnitDamageAbsorbed(
trigger inTrigger,
unitref inUnit,
string inBehavior,
);
# Event parameters
- Triggering Behavior — EventUnitBehavior
- Triggering Unit — EventUnit
- Damaging Unit — EventUnitDamageSourceUnit
- Damaging Player — EventUnitDamageSourcePlayer
- Triggering Damage Absorbed — EventUnitDamageAbsorbed
- Healing Unit — EventUnitHealLaunchUnit
- Healing Player — EventUnitHealLaunchPlayer
# Related
Category: Unit / Combat
- [F] —
fixed
— Get Unit Damage Dealt Time — ( UnitGetDamageDealtTime ) - [F] —
fixed
— Get Unit Damage Taken Time — ( UnitGetDamageTakenTime ) - [F] —
string
[ gamelink::Weapon ] — Weapon Used In Attack — ( EventUnitGetWeapon ) - [F] —
unit
— Item Used In Attack — ( EventUnitGetItem ) - [F] —
string
[ gamelink::Item ] — Item Type Used In Attack — ( EventUnitGetItemType ) - [F] —
void
— Unit Dies — ( TriggerAddEventUnitDied ) - [F] —
unit
— Killing Unit — ( libNtve_gf_KillingUnit ) - [F] —
int
— Killing Player — ( libNtve_gf_KillingPlayer ) - [F] —
bool
— Triggering Death Type Check — ( EventUnitDamageDeathCheck ) - [F] —
void
— Unit Is Being Removed — ( TriggerAddEventUnitRemoved ) - [F] —
void
— Unit Starts Attacking (Deprecated) — ( TriggerAddEventUnitStartedAttack ) - [F] —
void
— Unit Starts Attacking — ( TriggerAddEventUnitStartedAttack2 ) - [F] —
void
— Unit Is Attacked (Deprecated) — ( TriggerAddEventUnitAttacked ) - [F] —
void
— Unit Is Attacked — ( TriggerAddEventUnitAttacked2 ) - [F] —
unit
— Attacking Unit — ( EventUnitTarget ) - [F] —
void
— Unit Absorbs Damage — ( TriggerAddEventUnitDamageAbsorbed ) - [F] —
void
— Unit Takes Damage — ( TriggerAddEventUnitDamaged ) - [F] —
unit
— Damaging Unit — ( EventUnitDamageSourceUnit ) - [F] —
int
— Damaging Player — ( EventUnitDamageSourcePlayer ) - [F] —
string
[ gamelink::Effect ] — Damaging Effect — ( EventUnitDamageEffect ) - [F] —
fixed
— Triggering Damage Taken — ( EventUnitDamageAmount ) - [F] —
fixed
— Triggering Damage Attempted — ( EventUnitDamageAttempted ) - [F] —
fixed
— Triggering Damage Attempted Vitals — ( EventUnitDamageAttemptedVitals ) - [F] —
fixed
— Triggering Damage Absorbed — ( EventUnitDamageAbsorbed ) - [F] —
fixed
— Triggering Damage Behavior Shield — ( EventUnitDamageBehaviorShield ) - [F] —
fixed
— Triggering Vitals Leeched — ( EventUnitDamageVitalsLeeched ) - [F] —
int
— Triggering Unit Kill XP — ( EventUnitDamageKillXP ) - [F] —
point
— Damage Source Position — ( EventUnitDamageSourcePoint ) - [F] —
void
— Unit is Healed — ( TriggerAddEventUnitHealed ) - [F] —
unit
— Healing Unit — ( EventUnitHealLaunchUnit ) - [F] —
int
— Healing Player — ( EventUnitHealLaunchPlayer ) - [F] —
int
[ preset::UnitVitalType ] — Triggering Heal Vital Type — ( EventUnitHealVital ) - [F] —
fixed
— Triggering Heal Given — ( EventUnitHealAmount ) - [F] —
string
[ gamelink::Effect ] — Healing Effect — ( EventUnitHealEffect ) - [F] —
void
— Unit Spends Vital — ( TriggerAddEventUnitSpendVital ) - [F] —
int
[ preset::UnitVitalType ] — Triggering Spent Vital Type — ( EventUnitSpentVitalVital ) - [F] —
fixed
— Triggering Vital Spent — ( EventUnitSpentVitalAmount ) - [F] —
void
— Unit Acquires Target — ( TriggerAddEventUnitAcquiredTarget ) - [F] —
unit
— Acquired Target — ( libNtve_gf_AcquiredTarget ) - [F] —
void
— Unit Is Revived — ( TriggerAddEventUnitRevive ) - [F] —
unit
— Triggering Victim Unit — ( EventUnitVictimUnit ) - [F] —
unit
— Triggering Item Used — ( EventUnitItemUsed ) - [F] —
string
[ gamelink::Effect ] — Triggering Effect Used — ( EventUnitEffectUsed )
# Examples
# campaigns/voidstory.sc2campaign
// L10286
TriggerAddEventUnitDamageAbsorbed(libVoiC_gt_PC_AchievementShieldAbsorb, null, "SOASuperShield")
# mods/heroesdata.stormmod
// L6313
TriggerAddEventUnitDamageAbsorbed(libGDHL_gt_HeroArthasAntiMagicShellHeal, null, "ArthasAntiMagicShellCaster")
// L8906
TriggerAddEventUnitDamageAbsorbed(libGDHL_gt_HeroChenStaggerDamageResponse, null, "ChenStaggerProtectedBuff")
# mods/heroesdata.stormmod
// L15373
TriggerAddEventUnitDamageAbsorbed(libGame_gt_ProtectorDataCollection, null, null)
# mods/heromods/genji.stormmod
// L353
TriggerAddEventUnitDamageAbsorbed(libHGen_gt_HeroGenjiDeflectMissileLauncher, null, "GenjiDeflectMissileLauncher")
// L423
TriggerAddEventUnitDamageAbsorbed(libHGen_gt_HeroGenjiDeflectAbsorbDamage, null, "GenjiDeflectProtected")
# mods/heromods/zarya.stormmod
// L1089
TriggerAddEventUnitDamageAbsorbed(libHZAR_gt_HeroZaryaEnergyGain, null, "ZaryaPersonalBarrier")
// L1090
TriggerAddEventUnitDamageAbsorbed(libHZAR_gt_HeroZaryaEnergyGain, null, "ZaryaShieldAlly")
// L1091
TriggerAddEventUnitDamageAbsorbed(libHZAR_gt_HeroZaryaEnergyGain, null, "ZaryaPersonalBarrierIAmTheStrongest")
// L1092
TriggerAddEventUnitDamageAbsorbed(libHZAR_gt_HeroZaryaEnergyGain, null, "ZaryaPainIsTemporary")
// L1093
TriggerAddEventUnitDamageAbsorbed(libHZAR_gt_HeroZaryaEnergyGain, null, "ZaryaShieldAllyGainTrain")
# mods/starcoop/starcoop.sc2mod
// L18117
TriggerAddEventUnitDamageAbsorbed(libCOMI_gt_CM_Fenix_SentryNullShield, null, "SentryFenixNullShield")
// L26116
TriggerAddEventUnitDamageAbsorbed(libCOMI_gt_CM_Tychus_OilBombFireDamageResponse, null, "TychusFirebatOilBombed")
# mods/starcoop/starcoop.sc2mod
// L6542
TriggerAddEventUnitDamageAbsorbed(libCOOC_gt_CC_ScoreArtanisAbsorb, null, "SOASuperShield")
// L7503
TriggerAddEventUnitDamageAbsorbed(libCOOC_gt_CC_ScoreNovaAbsorb, null, "NovaCoopCasterDefensiveMatrix")
// L8231
TriggerAddEventUnitDamageAbsorbed(libCOOC_gt_CC_ScoreTychusMedicAbsorb, null, "TychusMedicDefensiveMatrix")
# mods/warcoop/warclassic.sc2mod
// L34
TriggerAddEventUnitDamageAbsorbed(t,ur,inBehavior)