Why isn't this function firing?

I’m trying to create a combo system with animation montages and notifs.

I can get the character to attack fine but the montage plays in full instead of the notifys triggering if you don’t click to continue the combo and I don’t understand why they’re not triggering.

I have things set up differently than usual because I’m making something a bit unusual.

I have this montage setup:

This simple state machine setup:

In BeginPlay() I run this to get the anim instance and set up a notify handler. My debug check says it’s triggering as expected:

This, however, is not triggering and I don’t understand why it’s not:

This is the attack function, it fires once when not attacking as expected only the animation plays in full regardless of if you clicked again or not, I presume because the notify handler isn’t engaging:

Suggestions and/or insights would be appreciated.

Hi @LockeKosta

When I’ve had to deal with this, the only solution I found when using C++ is to create your custom Notify State class and override the notify functions.

Create your custom NotifyState class and convert your montage notifies to this type, then you will be able to intercept all the notifies.

You can use the const FAnimNotifyEventReference& EventReference parameter to get the name of the Notify or any information you need.

That’s not a bad idea and I was probably going to wind up doing that at some point anyway.

I just thought for sure I was missing something obvious.

I got it working with this:

I’d still like to know why it wasn’t working before and if there was something I could do but I probably was going to want to utilize custom notifys in the future anyway.

Are there any traps or inefficiencies in this that I should look out for? Or possibly a better way to go about or write this than what I’ve got here in your opinion? If you don’t mind of course, I appreciate the assistance you’ve already provided nonetheless.

To clarify, it’s very common to make your own custom NotifyState classes and subclasses, nothing to be worried about doing that.

About why it doesn’t work with default Notifies… I’m not really sure. Probably default Notifies created for Blueprint work differently and need to be accessed in a different way or through a different class, I can’t really give you a better or an accurate explanation.