Repository navigation
04. Creating animation events and notifies
For having rich animations, you not only need to be able to correctly display the animation in the correct time and situation (which we accomplished by using the AnimationBlueprint), but you also need to be able to play effects, trigger events and play sounds at very precise timings.
For this, PaperZD comes with its own AnimNotify system, similar to the one that comes with the Engine.
Opening the Walk animation sequence should display the Animation Editor that we used previously, below the viewport, there’s a Timeline that we can use for setting up events.
In this timeline, you can add as many AnimNotifies and NotifyStates as you want. The plugin comes with some default ones, but you can always create custom Blueprint and C++ subclasses to create your own behavior.
For illustrating the point, we’ll create a “Source AnimNotify”, which is a type of Notify that lives inside the AnimationSource and it can be implemented by any AnimationBlueprint that inherits from this source.
Right click on the Timeline, and click NewNotify, filling the name when prompted, let’s call it Footstep

We’ll move it to the correct place (just when the foot hits the floor) and then we’ll create another Footstep notify, by selecting from the already created ones.

The Timeline should look like this:

Normally, just setting the notify and correctly configuring it would be enough, but SourceNotifies need to be implemented by the AnimationBlueprints that derive from this Source.
If we go back to our AnimationBlueprint, by simply clicking the top-right selector hotlink, we will see that the AnimationBlueprint has automatically created a new function for us.

SourceNotify Functions will automatically be created on every child AnimationBlueprint and they will all share the same naming convention: Receive Notify: .
We’ll simply double click on this function and put some really simple behavior for now.

If we compile and play, we should be able to see the behavior being triggered at the correct times.
