Hello, I am coming here for help with a project.
I am porting my Ludum Dare 45 game, Buzzsaw Cat to love2d. I wrote it in PICO-8.
One reason for the port is to use it with LovePotion on my 3DS.
LovePotion uses love.gamepadpressed and love.gamepadreleased to check for input, so for the computer version, I am using keypressed and keyreleased.
I am trying to convert the inputs to PICO-8's BTN() format. The game opens with a title screen that waits for the user to press button 5. Button 5 is mapped to the space bar under my current system. The game does not detect that the space bar is being pressed, and therefore does not activate Button 5 in the PICO-8 code. The console window is monitoring the state of button 5, and as you can see, it is returning a stream of false's.
I do not know if this is helpful, but I noticed that keyreleased is working. If you start all buttons as pressed, upon releasing space, it unpresses the button.
Any sort of help would be appreciated.
love.keypressed not working as expected.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
love.keypressed not working as expected.
- Attachments
-
- ld45.love
- the .love file
- (36.39 KiB) Downloaded 139 times
Re: love.keypressed not working as expected.
Hi and welcome to the forums!
The love.keypressed which is at line 90 seems to work correctly, but you are overwriting it with an empty love.keypressed on line 189. Removing it seems to have fixed the issue.
The love.keypressed which is at line 90 seems to work correctly, but you are overwriting it with an empty love.keypressed on line 189. Removing it seems to have fixed the issue.
Re: love.keypressed not working as expected.
Amazing! Thank you so much for the help.
Who is online
Users browsing this forum: No registered users and 5 guests