Keyboard Management Problem in Love2d
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Citizen
- Posts: 78
- Joined: Wed Sep 11, 2019 10:38 am
Keyboard Management Problem in Love2d
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
- zorg
- Party member
- Posts: 3444
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Keyboard Management Problem in Love2d
Me and my stuff True 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.
-
- Citizen
- Posts: 78
- Joined: Wed Sep 11, 2019 10:38 am
Re: Keyboard Management Problem in Love2d
Oh thank you! It works!
Who is online
Users browsing this forum: Ahrefs [Bot] and 90 guests