Parry, Block, Guard Break and Executions in UE5
Documentation Unreal Engine Player Combat Defense Tutorial
Souls-like defense in Unreal Engine 5 without C++: a timed parry and a held block from the weapon, guard break when stance runs out, a counter window, and executions.
A souls-like defense is a chain: a block that holds while the button is down, a parry for a press timed to the blow, a guard that breaks when the defender runs out of stance, and a finisher on the enemy left open. In Universal Player Combat each link is an asset: a Defense Rule Set the weapon lends, a stance pool on the character, and a Paired Action the player's graph plays.
The defense runs on Unreal Engine 5.6, 5.7 and 5.8 and is set up in data assets and the action graph, in single player and multiplayer.
Try it in the demo
Play
LVL_UPC_Demo and step onto the Soulslike style plate. With two swords drawn, press Q as a blow lands to parry it, or hold Q to block. After 250 damage the arena's boss stays stunned until you walk up and press light attack, and only that sword execution kills it.| What you see | Where it comes from |
|---|---|
| A parry on a press timed to the blow, a block while Guard is held | DefenseRuleSet_UPC_Sword, lent by Item_UPC_Sword |
| The attacker recoiling from a parry | The rule set's Outcome Effects, and GA_UPC_ParryRecoil |
| The execution on the stunned boss | Paired_UPC_Sword_Execute_A, a Paired Action |
Parry and block
A Defense Rule Set holds an ordered list of responses. On each hit the list runs top down, and the first response that fits decides what the blow deals. A weapon lends its set while it is drawn.
Set it up
5 minutes- 1
Create the rule set
Right-click in the Content Browser, UPC > Damage and Defense > Defense Rule Set, and name itDefenseRuleSet_MySword. Press + on Responses twice and pick UPC Guard both times. - 2
Make the first a parry, the second a block
A Guard starts out as a block. List the parry first, so a hit inside the parry window does not reach the block.Field Parry (first) Block (second) Required Defender Tags UPC.State.ParryingUPC.State.BlockingDamage Multiplier 0 0.2 (as it ships) Result Tag UPC.DamageResult.ParriedUPC.DamageResult.BlockedCost Per Damage 0 1 (as it ships) - 3
Lend it from the weapon
Open your sword's Item Definition, add a Guard fragment and point its Defense Set atDefenseRuleSet_MySword. The character answers hits with it while the sword is drawn. - 4
Hold the tags while the guard is up
In the sword's action graph, wireUPC.Input.Guardfrom idle into a raise move. On its montage, add a UPC State Tag Window holdingUPC.State.Parryingover the parry frames. After the raise, a Hold move with Applied TagsUPC.State.Blockingkeeps the block up. Input Released, wired out of both the raise and the hold, leads to a lowering move or to a To Root card (Add Return To Root on the canvas menu), which ends the guard. MapIA_UPC_GuardtoUPC.Input.Guardin the sword's Input Mappings.ROOTUPC.Input.GuardGuard RaiseAM_Guard_RaiseAutoGuard HoldUPC.Input.GuardUPC.Input.GuardZoom -1↩To RootA held guard: letting go leads to To Root from the raise and from the hold. - 5
Play and take a hit
With the guard held, a fifth of the damage lands. Inside the parry window nothing lands, and the attacker's swing comes back marked Parried.
A Guard answers only blows inside Arc Half Angle Degrees of the character's front (60 for a block), so a hit from behind lands in full. To parry out of a swing, wire Guard from each attack with Timing Interrupt (A parry and a block).
Guard break: stance that runs out
A block that costs a pool breaks when the pool cannot pay. Set the Guard's Cost Vital Tag to a pool on the character's Vitals, such as stance, and tick Spend Remainder when Unaffordable: a blow the guard cannot afford empties the pool and falls through to the responses below it.
| You want | Set |
|---|---|
| The attacker told the guard broke | A UPC Scale Damage below the guard, with UPC.State.Blocking in Required Defender Tags and UPC.DamageResult.GuardBroken as its Result Tag |
| A stun when the pool empties | The pool's Depleted Gameplay Event sends UPC.Event.GuardBreak; a stun ability triggered by that event holds UPC.State.Staggered, as the demo's GA_UPC_Stun does |
| An attack a block cannot stop | UPC.Attack.Unblockable in the attack's Damage Tags and in the blocking Guard's Blocked Attack Tags. The block stays silent; a parry still works. |
| An attack a parry cannot turn aside | UPC.Attack.Unparryable in the attack's Damage Tags and in the parrying Guard's Blocked Attack Tags. A block still works. |
| An attack the player can only dodge | Both tags on the attack, each listed on its own Guard |
| A warning over an unblockable attack | A UPC Telegraph Window on its wind-up; the demo draws a red cross over an unblockable swing (Telegraphs) |
The demo sword's guard spends stance and no health: a parried 10-damage blow costs 5 stance, a blocked one 10. A demo enemy whose stance empties is stunned by
GA_UPC_Stun, which opens it to an execution.After a parry: recoil and a counter window
Outcome Effects on the rule set run once a hit is resolved, gated on its result. Two rows make a parry pay off:
| Row | Does |
|---|---|
UPC Send Gameplay Event to the attacker, requiring UPC.DamageResult.Parried | Starts a recoil ability on the attacker, as UPC.Event.ParryRecoil starts the demo's GA_UPC_ParryRecoil |
UPC Apply Gameplay Effect on the defender, requiring UPC.DamageResult.Parried | Applies GE_UPC_CounterWindow, which holds UPC.State.CanCounter for a second |
Put
UPC.State.CanCounter in a transition's Required Tags, and that move, a riposte, plays only after a parry (Defense).Executions on a stunned enemy
An execution is a Paired Action: one move two characters play together, each in a role with its own montage, lined up around one spot. Build it in the Pairing Editor (Paired Actions), then gate it on the stun:
- On the Victim role, set Required Actor Tags to
UPC.State.Staggered, so only a stunned enemy fits. AddUPC.State.Intangibleto Tags During Action, so other swings pass through the victim, and tick Stand Down Actions on Join. - Set Release Rule to When All Finish, so the victim stays in the action until the attacker's part ends.
- In the player's action graph, add a move with the Play Paired Action payload naming the action, Owner Role Id
Attacker, and wire idle to it onUPC.Input.Execute.
The press finds an enemy that fits the Victim role within reach, slides both into place and plays both montages. With nobody fitting, the move fails and its Action Failed wire runs. Step by step: An execution on a stunned enemy.
Counters on an enemy's swing
A counter answers a blow on its way: Guard pressed while a counterable swing comes in plays a paired move instead of a guard. The swing's montage marks it counterable with an attack tag, a Paired Action Set holds one row per counter, and the Paired Action Available condition on the Guard wire picks the counter only while one fits. The demo's Freeflow arena shows a counter marker over each punch you can counter (A counter).
AdvancedDodges, armor and poise
| You want | Set |
|---|---|
| A dodge that swings pass through | Hold UPC.State.Intangible over the dodge; the attacker's Pass Through Tags list it (Patterns) |
| Frames that take no damage but still play the impact | UPC Invulnerable at the top of the list, with its Required Defender Tags |
| Armor against one kind of damage | UPC Scale Damage at the bottom, the damage type in Required Attack Tags |
| A flinch only when poise breaks, and hyper armor on a heavy swing | A poise pool and Outcome Effects that start a flinch (Hit Reactions) |
MultiplayerDefense online
- The server resolves every hit against the defender's responses, charges the pools and runs the outcome effects. Vitals replicate on their own.
- Only the server starts and ends a paired action. The graph move asking for an execution starts at the press like any other move, and the paired part follows a round trip later.
- Preview Incoming Damage gives a real hit's answer on any machine and charges nothing, for a guard meter.
Common questions
Can a shield block while a sword attacks? Yes. A drawn shield lends a block of its own through its Guard fragment, and its guard moves fold into the sword's graph while it is out (A shield bash).
Does a block work from any direction? No: a Guard answers blows inside its arc. Set Arc Half Angle Degrees to 180 to accept every direction.
Can enemies parry the player? The defense runs on any character with a UPC Defense component, enemy or player, so an enemy holding a guard tag blocks the same way. Deciding when to parry is enemy AI, which is not included; in Soulslike Enemy Combat, the enemy AI plugin of the same family, enemies parry, dodge and counter.
Does a timed parry feel like Sekiro or Dark Souls? A press timed to the blow lands inside the parry window: the blow deals nothing, and with a recoil row in the outcome effects, as the demo sword has, the attacker recoils. A held block takes the blow at its Damage Multiplier and spends its cost, such as stance. How tight the timing feels is the length of the parry window on the raise montage.
Can I use my own execution animations? Yes. Give each role its montage and press Derive Offsets in the Pairing Editor to line them up.
Do I need C++? No. A response of your own is a Blueprint child of UPC Defense Response.
Related
| Page | Why |
|---|---|
| Defense | Every response, field and outcome effect |
| Paired Actions | Roles, anchors, picking the victim, and counters |
| Pairing Editor | Line up roles, time montages and key a camera shot |
| Vitals | Health, stamina and stance pools |
For a Dark Souls style player, Souls-like Player Combat in UE5 lists each part in the order to build it.