(Dash ability) Input key down problem
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 :
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 :
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.
asked Jun 20 '18 at 11:39 AM in Blueprint Scripting
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.
answered Jun 20 '18 at 12:15 PM
Or if you still want to use "get input key time down" this will work:
answered Jun 20 '18 at 12:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here