- Home /
I want my player to jump only once. How?,
Hello.. I make a game where you avoid obstacles! In the 3rd level i added hole and a jump button.. The problem is that you can jump multiple times or just hold the button.. and that just breaks the game/level. My question is how to make my player to jump only once or once per certain amount of time! Thanks in advance.,I'm making a game where you avoid obstacles.. i made a hole in the level and added jump button.. But i can press it multiple times and i just break the level/game... I can avoid all things in once like this.. Can anyone tell me how to make the player jump only once.. I'm new to game dev and I dont know many things.. Thanks in advance
Answer by TanselAltinel · May 05, 2018 at 08:58 PM
There are several ways to approach this. My first solution would be checking if player landed after jumping, to make sure if it can jump again.
You can also find many different approaches.
This, for example, is a good tutorial:
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How can I make my jumping only work when I'm touching the ground? 2 Answers
How do I jump? 0 Answers
Distribute terrain in zones 3 Answers