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"

(Dash ability) Input key down problem

Hello,

I just started learning UE4 Blueprints and I have a problem when I want to make a dash ability. I'm using the launch character function and it works pretty well when I put a random value :

alt text

But now I'm trying to scale the time from how long the key has been down (thanks to the Get Input Key Time Down function) with a fixed vector. This is what I tried :

alt text

And unfortunately it doesn't work... Did I miss something ? Is the Get Input Key Time Down function returns a time in ms or in seconds ? Thanks for your attention.

Product Version: UE 4.19
Tags:
more ▼

asked Jun 20 '18 at 11:39 AM in Blueprint Scripting

avatar image

Hadamard
3 1 2

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

2 answers: sort voted first

Input Key Time Down will be 0 there since you only check it after the key has been released. It is no longer down.

What you can do instead is store the time the key was pressed then compare it to the time when it was released.

The node Get Real Time Seconds should help. Just store it on press then use it again and subtract the stored value to get the time that has passed.

more ▼

answered Jun 20 '18 at 12:15 PM

avatar image

HarryHighDef
1.3k 1 12 16

avatar image Hadamard Jun 20 '18 at 12:46 PM

ohh ok I understand thank you !

avatar image HarryHighDef Jun 20 '18 at 12:57 PM

No Problem!

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

Or if you still want to use "get input key time down" this will work: alt text

more ▼

answered Jun 20 '18 at 12:27 PM

avatar image

Felix Leonhart
476 3 4 7

avatar image Hadamard Jun 20 '18 at 12:47 PM

Thanks I'll try this method too !

(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