What I'm trying to do is make the character activate its flying when the jump button is pressed again in midair. The player will slowly descend to the ground unless the jump button is pressed again and again. But then I'd like the player to be forced to land after about 5 seconds of flying to simulate being exhausted.
Here's a screenshot of What I have so far: ibb.co/KFJVLTM
Develop games in your browser. Powerful, performant & highly capable.
I don't know if this will help but look at this.