Search found 6 matches

by Rickfg
Tue Nov 21, 2023 11:59 am
Forum: Support and Development
Topic: punch animation - keypressed, keyreleased
Replies: 9
Views: 11542

Re: punch animation - keypressed, keyreleased

Edit: in the draw function, is P1_jab nil, or is jab_activeFrame? For the latter to be nil, it means that the jabFrames table is being indexed with some key that leads to no value, therefore it returns nil. Remember that in Lua tables are usually indexed from 1 and above, see if that's not the caus...
by Rickfg
Fri Nov 17, 2023 11:53 am
Forum: Support and Development
Topic: punch animation - keypressed, keyreleased
Replies: 9
Views: 11542

Re: punch animation - keypressed, keyreleased

So I tried to implement the below based on what you recommended. I added a print statement and although as soon as I press u it does print "true", as soon I press I get an error for the draw() function stating that expects a quad but got nil. mind you that self.jab should be doing the job ...
by Rickfg
Thu Nov 16, 2023 2:30 pm
Forum: Support and Development
Topic: punch animation - keypressed, keyreleased
Replies: 9
Views: 11542

Re: punch animation - keypressed, keyreleased

I am new to game developing as am doing as final project for a course. Hm, now that I think about it, isn't it odd that your course asked you to do a project but didn't teach you the fundamentals needed to make that project? Anyway, you need two switches / flags: one that tells if the character 'is...
by Rickfg
Wed Nov 15, 2023 11:36 am
Forum: Support and Development
Topic: punch animation - keypressed, keyreleased
Replies: 9
Views: 11542

Re: punch animation - keypressed, keyreleased

The tutorials are great but I think it would take me too much time given my deadline to apply all of that. As I would have to learn and likely refactor lots of my code. That being said, I was trying to find a work around and I do not understand why the following does not work: function love.keypress...
by Rickfg
Wed Nov 15, 2023 7:48 am
Forum: Support and Development
Topic: punch animation - keypressed, keyreleased
Replies: 9
Views: 11542

Re: punch animation - keypressed, keyreleased

Hi. That's a fun but also very complicated part of coding your game, when you're taking input events and translating them into behaviors in your game, so as to solve the problem of "when I press a key I want to trigger this thing to happen, and this thing will go on by the next few frames rega...
by Rickfg
Tue Nov 14, 2023 2:35 pm
Forum: Support and Development
Topic: punch animation - keypressed, keyreleased
Replies: 9
Views: 11542

punch animation - keypressed, keyreleased

Hello, I am new to game developing as am doing as final project for a course. I managed to animate everything as I am doing a small 2d beat 'em up type of game. The issue I am facing is that I set the key "u" to be a punch button. When key "u" is pressed (using keypressed) I set ...