anim8 and key events: how to?
Posted: Wed May 02, 2012 11:40 am
Hi,
I'm a LÖVE nooby and working on my first game with this tool.
I've searched through the forums, google, etc and couldn't find an example with uses AnAL or Anim8 (I'd prefer anim8) to animate a sprite on response to a key event -I'm using spritesheets which holds most of the art from my game.
I've managed to get the effect I wanted using quads and image, updating the 'current' quad with a table of quads. But my solution is cumbersome and I don't want to spend time tweaking it since anim8 does the job correctly.
So the question is: in order to attach an animation to a key even using anim8 what should I do? Animate has the method :update(dt) which is called where I used to swap quads, but I don't get how may I trigger other animations in there.
Is that even possible or should I used quads 'by hand'?
cheers!
I'm a LÖVE nooby and working on my first game with this tool.
I've searched through the forums, google, etc and couldn't find an example with uses AnAL or Anim8 (I'd prefer anim8) to animate a sprite on response to a key event -I'm using spritesheets which holds most of the art from my game.
I've managed to get the effect I wanted using quads and image, updating the 'current' quad with a table of quads. But my solution is cumbersome and I don't want to spend time tweaking it since anim8 does the job correctly.
So the question is: in order to attach an animation to a key even using anim8 what should I do? Animate has the method :update(dt) which is called where I used to swap quads, but I don't get how may I trigger other animations in there.
Is that even possible or should I used quads 'by hand'?
cheers!