Why does NotifyJumpApex() only get called once?

So I’m using paper 2D to make a platformer fighting game and want to use this function to switch my Sprite animation to a falling one. I’ve set
GetCharacterMovement()->bNotifyApex = true;
and I’m overriding the NotifyJumpApex() and calling Super::NotifyJumpApex()

I’ve added GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT(“Jump apex reached”));
to see when it gets called and it works how I wanted it to… but only once. The message doesn’t appear on the sceen again after the first time. Is there something I’m missing here like a reset or something?

Why are you overriding NotifyJumpApex? Just to add the debug print?

Also, a possibly easier way is just to check if the jump is providing force. There should be a node in your anim BP that you can use to police the transition from the jump ascending animation to the descending animation: if jump is not providing force, play the next anim.

Doing the debug messaging is part of my workflow, I use it to test if I can do what I want theoretically and then proceed.
I’m doing this project with paper2D so all the animations need to be manually set as far as I know. So I wanted to use the NotifyJumpApex to set the next animation which I have.
Also I am aiming to make this in as much C++ as possible since it’s what I’m used to and it’s more a solo project so I thought that doing without blueprints was the way to go.
I’ll try to use the method you suggested of checking if the jump is providing force though :slight_smile: . I’m still curious as to why the NotifyJumpApex is only called once though :confused:
Thanks for your reply :smiley:

It only gets called once because bNotifyApex gets set to false before NotifyJumpApex() is called.
I solved it by setting bNotifyApex to true in Jump().
Problem with this is, that when you are falling down and press jump again, NotifyJumpApex() gets called again.

1 Like