Jump to content

Jump Delay


Sweetgebus
 Share

Recommended Posts

Hello, I'm attempting to learn lua script and have been battling what I'm sure is a simple issue. I have my cube"Player" that I have made to be able to jump via key press. With the current logic, I can continue to press the key and the player will never hit the ground. I would like to be able to double jump and then wait for x amount of seconds before doing it again. I was looking into "Wait" but I'm not having luck with it either. 

Link to comment
Share on other sites

Although I am on my phone and cannot provide any code snippets, I would recommend making a Boolean that is set to false when the player is touching the ground and true when the player jumps. Two of those booleans would allow a double jump (if one is set to true only when the other is true).

i now hate love C++

Beeeeeeeeeeeeeep~~This is a test of the emergency signature system~~Beeeeeeeeeeeeeep

RX 6800XT | i5-13600KF | 32GB DDR5 | 1440p is perfect

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...