Mario's Animations

Mods, guides how to use and install mods go right in here.
Post Reply
User avatar
TripleXero
Posts: 892
Joined: 08 Aug 2012, 00:23
Contact:

Post » 08 Aug 2012, 00:29

I've been messing around with editing Mario's sprites to another character, I have pretty much everything figured out, besides one thing. I can't figure out animations. The new character has multiple jump frames, so I tried this (I knew it was going to screw something up before I even tried, though).

Code: Select all

		bigmariojump[i] = {}
		bigmariojump[i][1] = love.graphics.newQuad(231, (i-1)*36, 20, 36, 512, 256)
		bigmariojump[i][2] = love.graphics.newQuad(251, (i-1)*36, 20, 36, 512, 256)
		bigmariojump[i][3] = love.graphics.newQuad(271, (i-1)*36, 20, 36, 512, 256)
		bigmariojump[i][4] = love.graphics.newQuad(291, (i-1)*36, 20, 36, 512, 256)
		bigmariojump[i][5] = love.graphics.newQuad(311, (i-1)*36, 20, 36, 512, 256)
I'm new to this coding, but I'm slowly learning it. Is there a certain place in the code you need to edit to specify how many frames an animation has or how many animations there are?

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 08 Aug 2012, 00:40

Animations don't really exist in Löve without any libraries.
I wrote the running animation myself, by having a timer that runs everytime Mario should animate, and picking the right walking frame according to that.
You'll need to take a look at how that is done and do the same for the jumping.

Post Reply