Melee Combat in UE5 Without C++: Blueprints and Data Assets
Documentation Unreal Engine Player Combat Blueprint Tutorial
Set up third-person melee combat in Unreal Engine 5 as a designer, without writing C++: combos, weapons, hits, parry, lock-on and executions from Blueprints and data assets.
If you design games rather than program them, you can build a full third-person melee fight in Unreal Engine 5 from Blueprints and data assets: combos, weapons, hit detection, a parry, lock-on and finishers. Each of those is an asset you fill in or a Blueprint node you call, and the editor shows each move running while you play. Two optional setups need C++; What needs C++ names both.
Universal Player Combat covers the player side of the fight for Unreal Engine 5.6, 5.7 and 5.8, in single player, on a listen server and on a dedicated server. Its full C++ source ships with it, for a programmer who wants to read or extend it.
Start here
| You want | Page | Time |
|---|---|---|
| To see it working: the demo map, a sword off the rack, a hit on a training dummy | Getting Started | 5 minutes |
| A sword with a three-hit combo, from an empty folder | Build Your First Combo | 15 minutes |
| Your own character fighting, with its parent class left as it is | Character Setup | 10 minutes |
| An AI coding agent such as Claude Code, Codex or Cursor to build it from your mesh and animations | AI Agent Guide | 2 minutes, then the build |
Where each part of the fight lives
The data assets in this table (Action Graph, Item Definition, Damage Config, Defense Rule Set, Ability Set, Targeting Config, Combat Style and Paired Action) come from the Content Browser's right-click menu, under UPC. The other rows say what they are: a notify state on a montage, settings on a component, a Blueprint class and a Widget Blueprint.
| Part of the fight | What you make | Page |
|---|---|---|
| Combos | An Action Graph: each move a card, each button press a wire between cards | Combo System |
| A weapon with its own moves | An Item Definition whose Equippable fragment names the weapon's graph, keys and hit volumes | Items |
| Hits that land | A UPC Melee Trace Window, a notify state across the strike frames of the attack montage, and a Damage Config for what a hit is worth | Melee Trace |
| Parry and block | A Defense Rule Set the weapon lends while it is drawn | Parry, Block and Executions |
| Stamina and cooldowns | A row on the character's UPC Vitals component, and Costs and Gates on a move in the graph | Gates, Costs and Cooldowns |
| Lock-on | An Ability Set row for the lock button, and a Targeting Config | Lock-On Targeting |
| How the character turns and closes in | A Combat Style | Combat Styles |
| Executions and counters | A Paired Action, lined up in the Pairing Editor | Paired Actions |
| A flinch when hit | A Blueprint class whose parent is Gameplay Ability, started by a landed hit | Hit Reactions |
| Health and stamina bars | A Widget Blueprint whose parent is UPC Ability System Listener Widget | HUD and Input Prompts |
How a hit happens
A light attack passes through assets only, from the item in hand to the target's health.
A light attack, from the item in handto the target's health
1
The drawn item brings the moves
Item Definition, Equippable fragment
An Item Definition holds fragments, parts you add in its Details panel. Its Equippable fragment names an action graph, keys and hit volumes. Drawing a sword hands the character all three; drawing another item changes the moveset. With nothing drawn, the Default Item, such as bare fists, gives the moves.
2
A key becomes an input tag
Equippable: Input Mapping Context, Input Mappings
Each mapping pairs an Input Action with a gameplay tag such as UPC.Input.LightAttack, and the character's UPC Input Mapping component sends that tag on when the key is pressed.
3
The graph picks the move
Action Graph: a transition on the current node
Each transition out of a move names an Input Tag and the move it leads to: from idle (ROOT), UPC.Input.LightAttack leads to Light 1, and from Light 1 to Light 2. A press during Light 1 waits, and Light 2 starts when Light 1 ends. A montage can mark an action window, a stretch where a press cuts in sooner.
4
The move plays its montage
Action node: Play Montage
The node lasts as long as its montage, or the section it plays. Windows on the montage also say when the blade sweeps and which tags the character holds.
5
A trace window sweeps the blade
UPC Melee Trace Window, Equippable: Trace Sockets
Every frame of the window, the item's hit volumes sweep from where they were to where they are, so a fast swing does not skip the space between frames. Teammates are passed over.
6
The target answers the hit
Damage Config, then the target's Defense and Vitals
The window's damage config says what a hit is worth and what it sets off: sparks, hit stop (a short pause on impact), a flinch. The target's defense rules can parry, block or scale it, and what is left comes off its health.
What a Blueprint setup covers
Multiplayer. The components replicate on their own, so a Blueprint character runs on a listen server and a dedicated server. A few settings do not replicate and have to match on every machine; Multiplayer lists them.
Your own character. Add the components to the Character Blueprint you already have, or reparent it to UPC Character Base, which carries them (Character Setup).
Your own rules. A move's payload, a transition condition, a hook on a move, a defense response and a target score are classes you can subclass in Blueprint, and each joins its picker in the editor (Action Graph, Defense).
What needs C++
Two setups, both optional:
- An ability system kept on the PlayerState, so a player keeps their abilities across deaths and respawns, needs a PlayerState written in C++, since Blueprint cannot implement the interface it needs. The demo keeps the ability system on the character, which needs no code.
- UPC Character Movement on a character that keeps its own parent class takes C++, since a Blueprint cannot change the movement component's class. It smooths corrections under lag and keeps a lagging server from pulling a fast dash back. A character built on UPC Character Base moves with it already, and every other feature works on the engine's Character Movement (Character Setup).
Common questions
Do I need to know the Gameplay Ability System? Not to start. The moves are cards in a graph and the weapons are data assets. A hit reaction is a Blueprint gameplay ability, and the demo's
GA_UPC_HitReact is one to copy. Melee Combat on GAS maps what the plugin does with each part of the system.Can I use my own animations? Yes. Make a montage per attack, mark its strike frames with a trace window, and point a card at it (your own animations).
Does it include enemies? The demo's enemies run the player's own action graphs, pressed by a Behavior Tree. Enemy AI is not included; Soulslike Enemy Combat is the enemy AI plugin of the same family.
Is it a template I have to build my game inside? No. It is a plugin: its components go on your characters, and the
Demo folder can be removed once nothing of yours uses it (Removing the demo).Which engine versions? Unreal Engine 5.6, 5.7 and 5.8.
Related
| Page | Why |
|---|---|
| Patterns | Recipes from the demo: a parry, a counter, a dodge with two charges, an execution |
| Action Graph Editor | Wire moves together and watch a character run them in play |
| Combo System | Chains, input buffering, branches and cancels |
For a Dark Souls style player, Souls-like Player Combat in UE5 lists each part in the order to build it.