x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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?

Product Version: UE 4.9
Tags:
more ▼

asked Apr 15 '16 at 09:42 PM in C++ Programming

avatar image

Carry Limes
1 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Apr 16 '16 at 08:01 AM

avatar image

KingCole32
180 9 9 12

avatar image Carry Limes Apr 16 '16 at 03:50 PM

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 :) . I'm still curious as to why the NotifyJumpApex is only called once though :/ Thanks for your reply :D

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered May 01 '16 at 03:05 AM

avatar image

Chris-M
26 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question