You're already drawing the "stand" animation, and commenting out the walking one. And if you comment out the stand, and leave the walking, then the character walks, right?
So all I did was make a variable "walking", which is set to false every frame, and if either the right or left key is pressed, it gets set to true. Here's the edited main.lua:
http://pastebin.com/zySvcFzN
As for flipping the animation, you said that every tutorial and thread you've seen using love's normal draw functions, not AnAL's, but there's virtually no difference.
This is the draw function in AnAL.lua
Code: Select all
--- Draw the animation
local drawq = love.graphics.drawq or love.graphics.draw
function animation:draw(...)
return drawq(self.img, self.frames[self.position], ...)
end
So all it really does is take whatever arguments you give it and passes it to the draw function. You're drawing your objects by draw(x,y), you can add draw(x,y,angle,scaleX,scaleY) and so on. Adding a negative scaleX will flip the animations.