Deal damage the instant the attack button is pressed and you hit the enemy while still winding up. Wait until the animation ends and HP drops after the sword has already passed. Building an attack that feels right means deciding the window within the motion where hits are allowed .
That is what Animation Montage and Anim Notify are for. The Montage plays the attack, and Notifies placed inside it announce "open the hitbox here" and "close it here". This article builds up to left-clicking to attack and dealing 20 damage exactly once to a dummy in front of you.

What You'll Learn
- What Montage, Slot, and Notify are each responsible for
- Using a Notify to define only the window where hits land
- Opening and closing the hitbox with that window, and dealing damage once per target
- How to write it so the hitbox never stays open when playback is interrupted
What We Build
- Left-click plays the attack, and it returns to movement animation when it ends
- A box in front detects targets only during the downswing
- The same attack hits each target once, and the hitbox closes on interruption
- What do Montage, Slot, and Notify do?
- Create a Montage from the attack clip
- Insert a Slot and play it on click
- Define the hit window with a Notify
- Build the forward hitbox and a dummy with HP
- Open and close the hitbox with the window
- Damage each target only once
- Run it and confirm
- Bonus: extending to combos and upper-body attacks
- Summary
What do Montage, Slot, and Notify do?
First, sort out the names involved in an attack. An Animation Sequence is the motion clip itself: swinging a sword, extending an arm. An Animation Montage is an asset that arranges those clips and adds playback sections and mid-playback notifications.
The entry point that delivers Montage motion to the character is a Slot . Insert a Slot node into the Animation Blueprint's AnimGraph and the attack pose can replace the normal movement pose. A pose is the body's posture at that instant.
And an Anim Notify is a marker for calling logic mid-motion. You decide timings like "spawn the hitbox when the downswing starts" or "play a sound when the foot lands" while watching the animation.
| Mechanism | Its role here |
|---|---|
| Animation Sequence | The attack motion clip |
| Animation Montage | Plays the attack clip and announces mid-points and the end |
| Slot | Passes the Montage's pose into the AnimGraph |
| Anim Notify | Announces the window where the hitbox is active |
| The Character Blueprint | Takes input, toggles the hitbox, and sends damage |
Walking and running still switch via the State Machine . You can build attacks in a State Machine too, but a Montage lets the Character say "start the attack now" and receive its end or interruption. We use that combination here.

Create a Montage from the attack clip
What to prepare first
Use a UE5.6 Third Person project with the ABP_Player and Locomotion from the Animation Blueprint article as the foundation. The controlled BP_ThirdPersonCharacter 's Mesh should have ABP_Player set.
Additionally prepare one attack Animation Sequence that plays on Manny's Skeleton . A Skeleton is the asset holding bone names and connections. Clips authored for another character may not work directly, so convert them for Manny with the retargeting article if needed.
We use an In Place clip that animates without traveling. No sword model is required. We first use a box in front to check whether the attack motion and damage timing line up. The hands-on assumes single player.
Create AM_Attack
- Open the attack Animation Sequence and confirm it plays on Manny.
- Right-click that clip in the Content Browser and choose "Create" → "Create AnimMontage". Name it
AM_Attack. - Open
AM_Attackand confirm the Slot track isDefaultGroup.DefaultSlot. - Select the attack clip in the track and set "Loop Count" to
1. Use only the firstDefaultSection and do not create a loop back to itself. - Turn on "Enable Auto Blend Out" in "Asset Details". Set "Blend In" and "Blend Out" "Blend Time" to
0.1seconds each at first.
Blending is switching between two poses by gradually mixing them. Blend In goes from movement into the attack; Blend Out returns from the attack to movement. Enabling auto Blend Out lets a one-shot attack like this return to the original pose when it ends.
Montages can also loop, so "a Montage always ends after one pass" is not true. Build a one-shot attack with the settings above first.

Insert a Slot and play it on click
Create the attack entry point in the AnimGraph
Open ABP_Player 's AnimGraph and insert a Slot node between Locomotion and Output Pose . Search for Slot with right-click and set the added node's "Slot Name" to DefaultSlot .

Connect the white pose wire in the order Locomotion → Slot 'DefaultSlot' → Output Pose . Also turn on the Slot's "Always Update Source Pose". That keeps the underlying movement pose updating even while the attack is displayed.
The Montage's DefaultGroup.DefaultSlot corresponds to this DefaultSlot . You do not wire the Montage asset into the Slot; the motion arrives through the matching Slot name . Compile and save.
Call Play Montage from input
Create an Input Action IA_Attack with "Value Type" Boolean. Add a left mouse button binding to the existing IMC_Default . For creating input assets and confirming the Mapping Context is active, see the Enhanced Input article.
Create the following variables on BP_ThirdPersonCharacter . The two starting with b are Booleans remembering on or off.
| Variable | Type | Default | What it remembers |
|---|---|---|---|
bIsAttacking | Boolean | false | Whether an attack is playing |
bHitWindowOpen | Boolean | false | Whether damage is currently allowed |
HitActors | Array of Actor Object Reference | Empty | Targets already hit by this attack |
An array is a list holding several targets. An Object Reference points at "this one individual in the level". For HitActors , set the variable type to Actor "Object Reference" and change the container beside the type to "Array". It records the individual targets hit this time, not enemy types.
Place the IA_Attack event in the Event Graph and wire this order.
- From
Started, go to aBranchwithbIsAttackingas Condition. - From
False,Set bIsAttackingto true. Leave the True side unconnected so re-input during an attack is ignored. - Create
Clearfrom a Get ofHitActorsto empty the list. - Then place Play Montage . Get the
Meshfrom Components and connect it to "In Skeletal Mesh Component", and set "Montage to Play" toAM_Attack.

That gives you an entry that "starts only when not attacking". The Clear that follows erases the previous hit record. Without it, the next attack would treat targets as "already hit".

Leave "Play Rate" at 1 , "Starting Position" at 0 , and "Starting Section" as None . Started is the entry for pressing the button, so holding it does not start an attack every frame.
For now, connect Play Montage 's On Completed and On Interrupted each to Set bIsAttacking = false , so either path accepts the next attack. We replace both with FinishAttack , which also closes the hitbox, later.

Play once here. If left-click plays the attack and you can walk again afterwards, the clip, Slot, and playback entry are connected. No damage happens yet.
Define the hit window with a Notify
Announce a point, or a window
Montage-specific notifies come in two kinds: Montage Notify , which announces one moment, and Montage Notify Window , which has a start and an end. A footstep suits a point and a hitbox suits a window, which makes the intent easy to read.
We place one Montage Notify Window and name it HitWindow . Open AM_Attack and scrub the playhead to find the start and end of the downswing.

- Right-click on the notify track under the timeline's "Notifies".
- Choose "Add Notify State" → "Montage Notify Window". That is a different entry from the point notify under "Add Notify".
- Select the added window and set "Notify Name" in "Details" to
HitWindow. That is the notify's own name , not the track's name. - Drag the window's left and right edges to match the motion you want the hitbox active for. For a one-second clip, for example, start
0.20and end0.45seconds. To type values, right-click and set "Notify Begin Time" to0.20and "Anim Notify State Duration" to0.25. - Set "Montage Tick Type" to "Branching Point". We prioritize calling game logic exactly at the window's boundaries.
0.20 to 0.45 seconds is an example for explanation. Do not enter the same numbers for a clip of different length; match the arm and weapon motion. Including too much of the wind-up makes hits land before they look like they should.
Notifications come back to Play Montage
Play Montage reports what happened during playback through output pins on its right. Those later-called outputs are callbacks .
| Output | When it fires | What we connect next |
|---|---|---|
On Notify Begin | HitWindow starts | Open the hitbox |
On Notify End | HitWindow ends | Close the hitbox |
On Blend Out | It starts blending out of the attack toward a normal end | Close the hitbox |
On Completed | Playback and Blend Out finish without interruption | Close the hitbox and allow the next attack |
On Interrupted | Playback was interrupted, or could not play | Close the hitbox and allow the next attack |
The unnamed exec output at the top of the node continues right after the playback request is issued. It is not an output that waits for the attack to end , so do not wire cleanup there.
On Notify Begin / End respond to Montage-specific notifies. Regular notifies registered to the Skeleton with "New Notify" are received by events on the Animation Blueprint side. Also, the similarly named Play Anim Montage lacks the notify outputs we use here. Stick to the node named Play Montage .
Build the forward hitbox and a dummy with HP
Place AttackHitbox in front
On BP_ThirdPersonCharacter , add a Box Collision as a child of the Capsule Component and name it AttackHitbox . We attach it in front of the character rather than to a weapon bone.

| AttackHitbox setting | Value |
|---|---|
| Relative Location | X=80 , Y=0 , Z=0 |
| Relative Rotation / Scale | (0, 0, 0) / (1, 1, 1) |
| Box Extent | X=40 , Y=40 , Z=50 |
| Collision Presets | Choose OverlapAllDynamic first |
| Collision Enabled | Then change to No Collision |
| Generate Overlap Events | On |
| Hidden in Game | Off while testing |
Extent is the distance from the box's center to its edge. These settings make it 80 x 80 x 100 cm overall. Its center is 80 cm along X, so it reaches a target standing directly in front. Check in the Blueprint viewport that the box does not extend under your feet or behind you.
Overlap detects intersection without pushing the target back. We only want to know whether it hit, so we switch it to Query Only during the attack. Normally it is No Collision , stopping overlap detection entirely. The Preset showing as Custom after changing settings is fine as long as each entry matches the values above.
The box outline with Hidden in Game off is visible even while the hitbox is closed. Seeing the outline is not the same as being able to deal damage.
Drain and display the dummy's HP
Create a Blueprint BP_TrainingDummy with Actor as its parent. Add a Cube to Components and leave Scale at (1, 1, 1) . Set the Cube's "Collision Presets" to OverlapAllDynamic , "Collision Enabled" to Query Only , and "Generate Overlap Events" on. Leave "Simulate Physics" off.
The key point is enabling overlap notifications on both AttackHitbox and the Cube. Also turn on "Can Be Damaged" in "Class Defaults".
Create a Float variable HP with default 100 . Add Event AnyDamage to the Event Graph and subtract Damage from the current HP, then store it.

The white exec order is Event AnyDamage → Set HP → Print String . The value into Set HP is HP − Damage . Connect the current HP to the subtract node's upper A and the event's Damage to the lower B.
After storing, read HP back with a Get and connect it to Print String 's "In String". Connecting inserts a node converting Float to string. Setting "Duration" to 10 seconds means you will not miss the reduced HP.

This example adds no death logic; we just watch HP change. Place the dummy in the level with its center 50 cm above the floor so the Cube is not half-buried. Put it where the player can approach and overlap the forward hitbox with the Cube.
Open and close the hitbox with the window
Closing the hitbox is needed not only at the window's end but on interruption. Rather than repeating the same nodes in several places, gather it into a function on the Character. A function is a named, callable block of logic.
Create these three from the "+" on BP_ThirdPersonCharacter 's "My Blueprint" → "Functions". No inputs or return values are needed.
OpenHitWindow and CloseHitWindow

OpenHitWindow:Set bHitWindowOpen = true → Set Collision Enabled. Target isAttackHitboxand New Type isQuery Only.CloseHitWindow:Set bHitWindowOpen = false → Set Collision Enabled. Target isAttackHitboxand New Type isNo Collision.
Create Set Collision Enabled by dragging a Get of Components' AttackHitbox and searching from its blue pin. When opening, set the Boolean to true first . That way, if an overlap is reported the instant the hitbox becomes active, the damage logic we build next does not judge it "outside the window".
Standardize cleanup with FinishAttack
Wire FinishAttack as CloseHitWindow → Set bIsAttacking = false . CloseHitWindow leaves it closed no matter how often it is called, so being called from both Notify End and the end notifications is fine.

Return to Play Montage in the Event Graph and wire its outputs as follows.
- Create a
Switch on NamefromOn Notify Begin. Select the node, add an entry from the "+" on Details' "Pin Names", and name itHitWindow. ConnectPlay Montage's pinkNotify Nameto "Selection" and callOpenHitWindowfrom theHitWindowoutput. - Place another
Switch on NameonOn Notify Endand connect the sameNotify Nameto Selection. CallCloseHitWindowfrom theHitWindowoutput. - Call
CloseHitWindowfromOn Blend Out. - Replace the Set nodes you connected to
On CompletedandOn Interruptedwith calls toFinishAttack.

Switch on Name passes only the output matching the name that arrived. Adding another notify later will not be mistaken for the hitbox signal.
The next diagram extracts the same Play Montage 's end-related outputs. There is no need for a second playback node.

An interruption does not necessarily run the timeline to the end as planned. So do not leave cleanup solely to the window's end notification; also close it from the playback-end side . That prevents a state where the attack stopped but the hitbox stayed open.
Damage each target only once
Pass the overlapping target to one function
Select AttackHitbox and press the "+" on On Component Begin Overlap in Details' "Events". That is the event for when an overlap starts . It is not called every frame while overlapping.
Create a function TryHitTarget on the Character with an input TargetActor of type Actor Object Reference. Pass the overlap event's Other Actor to that input. Other Actor is "whatever just overlapped the box".
To add an input, select the function's entry node and use the "+" under Details' "Inputs". Inside the function you can wire from the TargetActor blue pin on the entry. To read it somewhere far away, as in the diagram, use Get Target Actor from right-click search. You do not need another Character variable.

Exclude out-of-window, non-dummy, and already-registered targets
Inside TryHitTarget , check in this order.
- Feed
bHitWindowOpeninto aBranch's Condition and continue only on True. - Place
Cast To BP_TrainingDummywithTargetActorinto Object. Continue only on success. That keeps damage off yourself and the floor, targeting only the dummy. - Create Contains from a Get of
HitActorswithTargetActoras Item. Contains checks whether that target is already in the list. - Connect that Boolean output to the next
Branch's Condition and continue to the damage logic only on the False side . True means this attack already hit it.

What we checked there is two things: "may we hit right now" and "is the target the dummy". From the Cast's success side, continue to the Contains check.

If the dummy leaves the box and re-enters, or if the target has several collision components, the overlap-start notification can arrive again. This check keeps HP from dropping each time.
Record, then call Apply Damage
Add the unregistered target to HitActors with Add , then call Apply Damage . Pass TargetActor to both Add's Item and Apply Damage's Damaged Actor.

| Apply Damage input | Setting |
|---|---|
| Damaged Actor | TargetActor |
| Base Damage | 20 |
| Event Instigator | Get Controller 's return value |
| Damage Causer | Self |
| Damage Type Class | DamageType |
Event Instigator is the Controller indicating "whose action caused this attack", and Damage Causer is "the Actor that directly caused the damage". The controlled Character attacks here, so use the values above.
Apply Damage does not find and reduce an HP variable directly. The receiving dummy's Event AnyDamage fires and does the subtraction there. Connect the sending and receiving sides and the flow from 100 to 80 on the first attack is complete.
HitActors is cleared at the start of the next attack, so attacking the same dummy again gives 60. The limit is once per target, so two dummies inside the box each take 20.
Run it and confirm
Compile, save, and test with just one dummy placed.
- Overlap without attacking : touching the Cube with the forward box shows no HP.
- Attack once in place :
80appears exactly once during the downswing. Holding the button does not repeat the attack. - Attack again after it ends : this time
60appears. - Attack from outside the box : HP does not change at a distance it cannot reach.

Next, move HitWindow 's start slightly earlier and compare. Moving 0.20 to 0.10 seconds starts landing damage while it still looks like the wind-up. Setting it back lets you compare where "the moment of impact" feels natural. If you picked a clip whose length is not one second, nudge the window's start back and forth too.
Confirm it also closes on interruption
For testing, place a keyboard K event in the Character's Event Graph and call Montage Stop from Pressed. Connect Mesh → Get Anim Instance 's return value to Target, set Montage to AM_Attack , and In Blend Out Time to 0.1 .

Temporarily setting Play Montage 's Play Rate to 0.25 slows the attack and makes it easy to press K during the window. Confirm that after the interruption, approaching the dummy does not reduce HP, and the next left-click attacks again. Set Play Rate back to 1 and remove the K test nodes afterwards.
When it does not work
| Symptom | Where to go back and check |
|---|---|
| No response to left click | Place a Print String right after IA_Attack 's Started. Check the IMC_Default binding and activation |
| Only the attack visuals do not change | The Anim Class on the controlled character's Mesh, matching Slot names, the connection to Output Pose, the clip's Skeleton |
| It moves but the hitbox never opens | Whether you made a Montage Notify Window, whether Notify Name is HitWindow, whether you used Play Montage |
| The hitbox opens but HP does not drop | Generate Overlap Events on both sides, actual overlap with the Cube, the dummy's Can Be Damaged, the Cast succeeding |
| One attack drops HP several times | Whether only Contains' False continues to Add → Apply Damage. Whether Clear is on the overlap event |
| One attack works but the next does not | Whether both Completed and Interrupted reach FinishAttack. Whether Auto Blend Out is on and the Section does not loop |
| It keeps hitting after an interruption | The Interrupted → FinishAttack → CloseHitWindow connections and Set Collision Enabled's Target |
Bonus: extending to combos and upper-body attacks
Sections decide "which stretch plays next"
A Section is a divider placed on the Montage timeline. Arrange three attack clips, name their starts Attack1 , Attack2 , and Attack3 , and you can specify which attack follows. Add them by right-clicking the Slot track and choosing "New Montage Section".

For "continue to the next attack on further input, otherwise end", first set each Section's next to None in the Montage Sections panel so it stops automatically advancing. Then, when the button is pressed during the accepting window, reserve the current Section's next with Montage Set Next Section .
Montage Jump to Section jumps to the specified stretch immediately, which differs from "finish this swing, then continue". Choose based on whether you want the attack shown to the end or switched partway.
This is an extension once the single attack works. Our bIsAttacking ignores input during an attack, so combos need logic recording the additional input. And if the next stage should hit the same target again, change HitActors to be cleared at the start of each attack.
Changing the Slot name alone does not limit it to the upper body
Our Slot replaces the full-body pose. To attack with the upper body while running, do more than name the Slot UpperBody : set "from which bone upward the attack blends in" with something like Layered Blend per Bone .
Slot Group also affects simultaneous playback constraints. It groups Slots, and playing another Montage in the same group interrupts the one already playing. Separating Slot names while keeping them in the same group does not give independent simultaneous playback.
From a forward box to the weapon's arc
Our box is fixed in front of the Character, so it does not follow the sword's tip. To match the weapon's shape, attach the hitbox to a Socket on a bone, or trace the range the weapon moved through since the previous frame.
If you want the forward step of the attack included in the clip, Root Motion becomes a separate topic. Complete the play, notify, and damage flow with an In Place clip first, then add movement handling, and causes stay easy to isolate.
Summary
A Montage plays the attack, a Slot delivers that motion to the character, and a Notify announces when to open and close the hitbox. The Character sends damage and the dummy reduces its own HP.
First confirm that one input produces one attack, and 100 becomes 80 only inside the hit window . Once you can move the window and compare the feel, the same mechanism works for your next attack clip.
Reference: Animation Slots, Animation Notifies, Montage Editor, Apply Damage