# Triggering Damage Attempted Vitals

Grammar — Triggering damage attempted to vitals
FlagsNative | Function

Returns the triggering damage amount attempted to vitals. This is the damage done before clamping against the amount of life the target unit has. Modified by damage responses.

Returns — fixed

native fixed EventUnitDamageAttemptedVitals();

# Supported triggers

Category: Unit / Combat

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SoundLib.galaxy:1371

    lv_damagingPlayer = EventUnitDamageSourcePlayer();
    lv_triggeringUnit = EventUnit();
    lv_damageAttempted = EventUnitDamageAttemptedVitals();
    lv_damageAbsorbed = EventUnitDamageBehaviorShield();
    if ((lv_damageAttempted < 1.0) && (lv_damageAbsorbed < 1.0)) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SoundLib.galaxy:1378


    if ((lv_triggeringPlayer >= 1) && (lv_triggeringPlayer <= libCore_gv_bALMaxPlayers) && (UnitTestState(lv_triggeringUnit, c_unitStateHallucination) == false) && (lv_damagingPlayer != UnitGetOwner(lv_triggeringUnit)) && (UnitTestState(lv_triggeringUnit, c_unitStateInvulnerable) == false) && ((lv_triggeringUnit == libGame_gv_players[lv_triggeringPlayer].lv_heroUnit) || (lv_triggeringUnit == libGame_gv_players[lv_triggeringPlayer].lv_activeVehicle))) {
        lv_damageDone = Round((EventUnitDamageAttemptedVitals() + EventUnitDamageBehaviorShield()));
        libSond_gf_HeroVOHeroGetHitResponse(lv_damageDone, lv_triggeringUnit);
    }