Help needed- dash once upon a space

Hi

Ive been following YT tuts on dashing, but now I have a problem. I can dash and dash ininitely, and I want player to dash only once when he is in the air. Ive been trying to put
if (Input.GetKeyDown(KeyCode.UpArrow))
but it was not the solution I am looking for
Thoughts?

Here is the script- basicaly, cooldown needed

7006778–828581–dashing.txt (2.12 KB)

@damniam0

Please paste the code here in code tags… not many will bother to open some random attached file.

You’ll have to keep track of grounded state of your character. When character is grounded, dash is not allowed. When character is not grounded, dashing is allowed.

1 Like