Page 1 of 1

Keyboard Management Problem in Love2d

Posted: Wed Oct 16, 2019 5:25 am
by ilovelove2019
Hello eveyone. Let's go to the main problem. I'm making a platform game, and I'm making player movement. Now, he can double jump. And the problem begin here. When I hold the button up, my character is like just jumping higher, it's not clear between two jumps. Algorithm is fine. The problem is that I use the love.keyboad.isDown ("w") method. I think it will continuously receive signals when the user holds down the w key. I want to find a method that when the user even presses the key, it only receives the signal once. And to be able to double jump, they have to press the w (spam it) button repeatedly. Sorry my English is not good. I need everyone to help with this. You can take a look at my .love file. Thank you very much.

Re: Keyboard Management Problem in Love2d

Posted: Wed Oct 16, 2019 7:48 am
by zorg

Re: Keyboard Management Problem in Love2d

Posted: Wed Oct 16, 2019 1:14 pm
by ilovelove2019
Oh thank you! It works!