Keyboard Management Problem in Love2d

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
ilovelove2019
Citizen
Posts: 78
Joined: Wed Sep 11, 2019 10:38 am

Keyboard Management Problem in Love2d

Post 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.
Attachments
block.love
(8.21 KiB) Downloaded 80 times
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Keyboard Management Problem in Love2d

Post by zorg »

Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
ilovelove2019
Citizen
Posts: 78
Joined: Wed Sep 11, 2019 10:38 am

Re: Keyboard Management Problem in Love2d

Post by ilovelove2019 »

Oh thank you! It works!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 76 guests