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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Window Time to press input after an Hit Event

Hi everyone,

After some time digging on the net without working result, i'm asking you for some help.

What i want : After an hit event, i want to let a window time to press a key and if it done in time, do the adequat reaction.

Example of application : When i hit a wall during a jump (so i get an hit event an know that it's a wall and i'm falling), if i pressed my jump key during the 3s after the hit (random time for the example) i made a wall jump.

I hope it's clear

Product Version: UE 4.20
Tags:
more ▼

asked Oct 08 '18 at 08:54 PM in Blueprint Scripting

avatar image

Earest
8 1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Create a boolean variable bCanWallJump.

IN the Hit event, set bCanWallJump to true, and also Set Timer by Event (set it to 3 seconds).ALSO store a reference to this Timer in another variable WallJumpTimer.

Connect the red pin of the Set Timer node to a Custom Event, and on that event's execution, set bCanWallJump to false.

When player hits the jump button then check the bCanWallJump variable. If it is true, make the pawn wall jump. If it is false, don't.

When the player wall jumps or lands on the ground or anything else like that, then set bCanWallJump to false AND use that WallJumpTimer variable to stop, reset, and/or invalidate the timer so the player can't wall jump when they're not on a wall.

more ▼

answered Oct 08 '18 at 11:45 PM

avatar image

mightyenigma
3.8k 18 20 20

avatar image Earest Oct 09 '18 at 10:27 AM

work perfectly, thanks

(comments are locked)
10|2000 characters needed characters left
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