Page 1 of 1
Space bar won't work
Posted: Sun Aug 10, 2014 4:33 am
by thewifitree
Whenever I run the game I'm working on at random points the jump button won't work. I can't find the reason for this in the code. Please help!
Re: Space bar won't work
Posted: Sun Aug 10, 2014 7:25 am
by Plu
I'm fairly sure that there's some sort of edge condition where your player can become grounded but the player.canJump flag isn't properly set back to true. Consider printing it's value to the screen somewhere and check whether it always returns back to true as soon as you expect the player should be able to jump again.
Re: Space bar won't work
Posted: Sun Aug 10, 2014 11:06 pm
by dusoft
thewifitree wrote:Whenever I run the game I'm working on at random points the jump button won't work. I can't find the reason for this in the code. Please help!
Works for me, maybe you can be more specific during what exact point of game this happens?
Also, check if keyboard ghosting is not related:
viewtopic.php?f=4&t=78189&p=169701&hili ... d+detected