trosh wrote:that's the graphics maurice wanted to use ><
I don't see anything wrong
I don't think that's true. This is the same problem I encountered when I was editing 1.4 to make spikeys be able to be stomped by boxes. The problem is in goomba:stomp() (spikeys are modified goombas). The animation line that it calls for stomped goombas or spikeys is "self.quad = goombaquad[spriteset][2]". That makes sense for goombas, where the spriteset matters. But for spikeys, the spriteset isn't used. I think this has the effect of only using part of the 16x16 pixel box for frame 2, but stretching it vertically to be 16x16. So it's not the graphic Maurice intended, just the one that happens to show up. The fix:
Code: Select all
function goomba:stomp()--hehe goomba stomp
self.dead = true
self.active = false
if self.t == "goomba" then
self.quad = goombaquad[spriteset][2]
else
self.quad = spikeyquad[2]
end
end
If you want there to be a frame especially for a spikey being stomped, here's what I drew:
... You'll also have to go through and change goomba:update in the spikey section. Any time it used to call frame 2, call frame 3 instead; do the same to switch 3 to 4 and 4 to 5. Also fix the initial frame in goomba:init for "spikeyfall" from 3 to 4. And adjust main.lua to do this when loading in spikey's graphics:
Code: Select all
spikeyquad = {}
for x = 1, 5 do
spikeyquad[x] = love.graphics.newQuad((x-1)*16, 0, 16, 16, 80, 16)
end
If I had been smarter, I would have put the stomped frame in the new 5th spot and not twiddled with the frame numbers.