Course contentsShow
← Unreal Engine Game Development
Lesson 371 of 8805. Animation and Character RiggingFree lesson

Triggering Gameplay Events with AnimNotifies

Place notify markers on animation timelines to execute custom logic like spawning particles or playing sounds at precise moments.

In this lesson, you will learn how to synchronize precise gameplay actions—like spawning footstep dust or playing a sword-swing sound—directly with specific frames in your animation sequences using AnimNotifies.

The "When" of Animation

While Animation Montages allow us to play sequences, AnimNotifies provide the bridge between visual movement and logic. Instead of guessing when a character’s foot hits the ground, you can place a "Notify" marker directly onto the animation timeline. When the animation playhead passes that marker during gameplay, it fires an event that your Blueprints or C++ code can "listen" for and act upon.

Placing a Notify

To add one, open any Animation Sequence or Montage. At the bottom of the editor, you will see a track labeled Notifies. Right-click anywhere on this track, select Add Notify, and then New Notify... (or choose a pre-existing one like PlaySound). Name it something descriptive, such as Footstep_Right.

Executing Logic

Once the marker is placed, you have two ways to handle the event:

  1. The Notify State: If you use a Notify State (which has a start and end point), you can trigger logic that needs to persist, such as enabling a weapon's collision box during a swing.
  2. The Animation Blueprint: Inside your Animation Blueprint (AnimGraph), you can catch these events using a specific node called AnimNotify_EventName. For our Footstep_Right example, you would create an event node named AnimNotify_Footstep_Right in your Event Graph. From here, you can execute logic like spawning an Emitter at Location or playing a Sound at Location.
// Logic inside the Event Graph
Event AnimNotify_Footstep_Right -> Play Sound at Location (Footstep_Cue) -> Spawn Emitter at Location (Dust_FX)

By decoupling your logic from the frame rate of the animation and tying it to these markers, you ensure your sound effects and visual impacts always line up perfectly with your character's movement, regardless of playback speed or blend settings.

Key Takeaway: AnimNotifies act as precision triggers, allowing your code to respond exactly when a specific visual frame is reached, ensuring tight synchronization between animations and game events.