Search found 2 matches

by Azo0ka
Mon Sep 04, 2023 8:42 am
Forum: Support and Development
Topic: how to call a function pressing a key?
Replies: 3
Views: 1414

Re: how to call a function pressing a key?

Ok. thanks... I know that the code can be weird, but I want to make it work and, then, make it a little bit clean. The idea is that love.draw() is a menu to selct between 2 options (P1 vs com or P1 vs P2). Making this way, when I press "1", it gives me this error: Error main.lua:44: attemp...
by Azo0ka
Sun Sep 03, 2023 9:56 am
Forum: Support and Development
Topic: how to call a function pressing a key?
Replies: 3
Views: 1414

how to call a function pressing a key?

Hi everyone, I'm a noob trying to make a remake of Pong. I have a menu screen and I want to go to the game pressing the "1" key, but it doesn´t work. The welcome screen is showed, but, when pressing the selected key, it doesn't work. here is the main.lua code. push = require 'push' WINDOW_...