Hit Reaction Ability
Summary: Hit Reaction Ability
- Should be granted by default to all characters.
- Works in conjunction with the Stagger and Death Abilities.
- The system automatically routes Fatal Damage to the Death Ability.
- You can handle specific types of damage using dedicated animations.
- This ability allows you to optionally rotate the Avatar towards the Instigator.
The UCombatAbility_HitReaction
ability is triggered by the Damage Manager component, when the Avatar receives damage.
It should be greanted by default to any character reacting to damage.
Stagger and Death Abilities
This Ability works in conjunction with the Stagger and Death Abilities. In the case of the Stagger ability, it allows you to separate damage that will interrupt other abilities (Stagger) or damage that would not create a reaction if something else is happening (this case). Stagger and Hit Reaction are mainly selected by the Poise attribute. For more information please check the Damage and Mitigation page.
As for the Death Ability, the system will automatically route fatal damage to that ability, instead of the Hit Reaction, Since the Death Ability will trigger proper interruptions and integrations with the Damage Framework.
Rotating to the Instigator
The Hit Reaction has one useful property, bRotateToSource
, which rotates the avatar to face the actor that has
applied the recent damage. You may adjust this as needed, or even extend the ability to turn this behavior on or
off based on other situations. For example, if the avatar is locked on a target, it should never rotate to another
actor applying damage.
Also, this ability has its own Animation Provider, UAnimationProvider_HitReaction
, which selects a specific Hit
Reaction Montage, based on the Gameplay Tags that represent the applied damage.
Reacting to specific damage
When this ability is triggered, additional information about the damage is available in the payload. You can use this information to trigger certain animations, configured in the animation provider.
The following Gameplay Tags are available in the system and are automatically provided:
Gameplay Tag | Description |
---|---|
Combat.Effect.Damage.Blocked |
The incoming hit was successfuly blocked. |
Combat.Effect.Damage.Breaker |
A breaker event was received, meaning the character was blocking and ran out of stamina. |
Combat.Effect.Damage.Critical |
A critical hit was received. |
Combat.Effect.Damage.Fatal |
A fatal hit was received. This is usually handled by the Death Ability |
Combat.Effect.Damage.LastStand |
A last stand event was triggered after this hit. |
Combat.Effect.Damage.Melee |
The incoming hit was a melee attack. |
Combat.Effect.Damage.Ranged |
The incoming hit was a ranged attack. |
Combat.Effect.Damage.Stagger |
The hit staggered the avatar, meaning its poise was fully consumed. This is usually handled by the Stagger Ability |
You can further extend this pattern, by adding other types of damage, such as adding the `Combat.Effect.Damage.Burnt
tag
to your Damage Gameplay Effect. This tag will be transferred to the Hit Reaction and will be available in the Animation
Provider, so a dedicated Animation Montage can play.
In the example below you can see the default Hit Reaction set to M_Fighter_Hit_Fwd
, but specific animations triggered for
other damage types such as Blocked
and Breaker
(as per the table above).
Of course, you might need to create proper abilities for certain characters and their specific reactions or skeletons.