Video summary

Unreal Engine Hack & Slash Tutorial [2024] Series | Part 4 | Heavy Attack Combat

Main summary

Key takeaways

Technology

Heavy attack system (UE “hack & slash” tutorial, Part 4)

Heavy attack input

  • Adds heavy attack input by creating a new Input Action in the Inputs folder.
  • Maps the action to the Right Mouse Button (labeled as “heavy attack” / “IOE heavy attack” in subtitles).

Heavy attack state buffering

Implements heavy-attack buffering similar to the light attack system:

  • If the character’s current state == Attacking, the script sets a “Save Heavy” flag.
  • Adds a custom event/function “heavy attack” that triggers the heavy attack flow using the same “can attack” boolean style as the light system.

Heavy attack execution + montage handling

Perform heavy attack (montage selection)

  • Creates a perform heavy attack function by copying light-attack logic and adjusting variables.
  • Sets up heavy attack montages as:
    • An array of heavy montages
    • An index to choose which heavy animation plays
  • Resets/advances the heavy attack index after playback.
  • Uses a local variable like “Lore heavy attack Montage” (auto-subtitle text) and prints debug info to confirm correct montage/index usage.

Reset heavy attack / buffer reset

  • Implements reset heavy attack / buffer reset using an animation notify-driven loop.
  • The “saved heavy” triggers at the correct timing via an Anim Notify State (e.g., “Save heavy attack”).
  • That notify state is referenced from Tick (called continuously, per the subtitle).

Animations + notify timing

Heavy variants

  • Creates four heavy attack montage/animation variants:
    • Heavy 1
    • Heavy 2
    • Heavy 3
    • Heavy 4

Buffer timing difference vs light

  • Heavy attacks have a longer delay before buffering/continuing.
  • Therefore, notify timing is set earlier/shorter than light to enable buffering at the intended recovery window.

Root motion configuration

  • Ensures Root Motion is enabled:
    • Enable root motion
    • Allow rotation on root motion
  • Applies a rotation scale/value (subtitle suggests ~15 as a starting point).
  • This lets the character rotate during heavy animations.

Heavy ↔ Light switching (not yet a full combo system)

  • Adds heavy-to-light and light-to-heavy switching using buffer flags.
    • Heavy → Light switching
      • Clears “saved heavy”
      • Uses “saved light” to queue the correct follow-up
    • Light → Heavy switching
      • Clears “saved light”
      • Queues heavy instead
  • Design intent:
    • Switching is allowed, but includes a punishing/noticeable delay, especially heavy → light, to encourage commitment to the performed action.
  • Note:
    • A true combo system (chaining light+heavy into rewarded combo attacks) is planned for a later video.

Fixes / gating logic (jumping + attacking constraints)

Jump/attack bug fixes

  • Prevents attacking while falling:
    • Checks movement component Is Falling
    • Disallows attacking when airborne
  • Prevents jumping during attack:
    • Jump is only allowed when state == none (not attacking/dodging/dead)

Animation overlap / blending cleanup

  • Fixes out-of-sequence blending by resetting opposite attack states:
    • Reset heavy before playing light
    • Reset light before playing heavy
  • Improves blend feel/timing:
    • Tweaks animation blend settings (mentions Blend Out and blend mode choices)
    • Adjusts blend-out timing and removes “excess animation frames” to align transitions better

Weapon Trails / VFX implementation (important practical details)

Trail visuals via Anim Notify State

  • Adds weapon trail visuals using an Anim Notify State called Trail.
  • Places it from swing start to swing end.

Trail positioning approach (sockets)

  • The workflow attempts socket-based spawning from weapon sockets, but switches to a more controlled method:
    • Adds sockets on the character mesh, such as:
      • Trail start
      • Trail end
    • Mentions an intermediate weapon socket for sword attachment/pivot.
  • Lesson learned:
    • For this project, sockets likely only need to exist on the character mesh; adding sockets to other skeleton meshes may not be necessary.

Trail coverage across attack types

  • Applies trails to both:
    • Heavy attacks
    • Light attacks
  • Achieved by copying the same notify/timing setup and ensuring sockets exist where needed.

Transform/sizing considerations

  • Socket transform tweaking is tedious:
    • Requires careful placement
    • Small imperfections are acceptable since animation motion creates natural dips.

Editor vs Play mode issue

  • If VFX shows in the editor but not in play:
    • Ensures the correct mesh/skeleton has the sockets.

Tutorial/product-style deliverable

  • The presenter offers a Patreon option to access project files for following along.

Main speakers / sources (from subtitles)

  • Primary speaker: “hey guys welcome back…” (creator/instructor; no name given in the subtitles)
  • Video source: Unreal Engine Hack & Slash Tutorial [2024] Series (tutorial channel/creator; specific channel not stated)

Original video