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"

Add Launch Character after Jump

Hi, how can I make the following code add the Launch Character nodes disregarding the first time the Player presses the Jump, that is, starting only when the Player has landed from the first Jump and presses Jump again:

Press Jump > Character Jumps > Character Has Landed > Press Jump Again > Characters Jumps > Adds Launch Character nodes > Character Has Landed > Press Jump Again > Characters Jumps > Adds Launch Character nodes > Character Has Landed > ...

Thanks.

Product Version: UE 4.22
Tags:
more ▼

asked Jun 13 '19 at 05:39 PM in Blueprint Scripting

avatar image

vtx_-
5 1 3

avatar image vicecore Jun 13 '19 at 07:36 PM

Inside your Character BP, create a bool called "Jump Is Pressed" and set it to define whether or not jump button is pressed ( as shown in picture )

Use the "Is Falling" node to determine whether or not your character is in the air. This connects to a reference of your character movement component inside your Character BP

I suggest using print strings like the ones shown, so you can visually see when your character is in air, landed, launched, etc

I'm also not sure if you want each additional jump to increase characters height velocity? If so, additional logic would need to be added to code shown in the picture.

Hope this helps ! alt text

avatar image vtx_- Jun 13 '19 at 10:33 PM

Hi vicecore, thanks for the code, it works like a charm, I just replaced the delay time from 0.2 to 0.02 and 0.1 to 0.01 so it is more responsive, thank you!

I was using a different approach, but I couldn't get the Event On Landed to reset, so it would work fine until I landed the first time, it assumed I have already landed every single time:

1.png (204.2 kB)
avatar image vicecore Jun 13 '19 at 10:52 PM

Great man - glad I could help !!

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

0 answers: sort voted first
Be the first one to answer this question
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