I am new-ish to LOVE2D and I am working on a new project for the first time, however, I am having some problems with it. For some reason the keypressed function won't call whenever a key is pressed. I have tried to put print(key) within the function, but it does not print anything in the debug console. Here is my main.lua code: http://pastebin.com/FwAAc5Ry
Any possible way to fix? Thanks!
keypressed function won't call
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: keypressed function won't call
Are you sure? Try printing something out in the kepress function to see if it's really called.FOXmcloud021 wrote:the keypressed function won't call whenever a key is pressed
From the code you've shown, ACanBeDown and SCanBeDown will never be true, so those conditions will always fail and nothing's going to appear to happen when you hit keys. Maybe you meant to initialize those to true instead of false?
Last edited by airstruck on Mon Jul 20, 2015 6:32 pm, edited 1 time in total.
-
- Prole
- Posts: 2
- Joined: Mon Jul 20, 2015 5:19 pm
Re: keypressed function won't call
I got it fixed
Sorry for the inconvenience!
Sorry for the inconvenience!
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests