MegaMan based. Basically, two figures going mano-a-mano in a room. I guess I've spent a lot of time learning small stuff, but this is my first attempt to put together a comprehensive package. I'll update it as I go. The biggest challenge for me is figuring out how to structure my files and programs.
My first goal is to get animation running, so I've abandoned collision detection with structures in favor of just a basic x=math.max(x1,math.min(x2,x)) sort of deal.
And ACTUALLY, here's a problem I'm having with sprites v2: When I try and move the contents of love.update(dt) into a separate function of its own, and then call on it, it doesn't seem to work, and I don't know why. Essentially, I want to move that chunk from main.lua into drawSprite.lua.
slowly building a boss rush.
slowly building a boss rush.
- Attachments
-
- sprites v2.love
- (6.52 KiB) Downloaded 152 times
-
- boss simple.love
- (24.19 KiB) Downloaded 324 times
Re: slowly building a boss rush.
The reason your code doesn't work in a function is because you are trying to set the global variable "frame" in the function, but the function creates a local variable "frame" as part of the input arguments - this means when you set "frame" in the body of the function it's actually just setting the local variable that's discarded when the function returns. You'll need to rename one of the variables so they don't clash, or perhaps move frame to be part of the "animate" table.
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest