Navigating frames in anim image?

BlitzMax Forums/BlitzMax Beginners Area/Navigating frames in anim image?

Amon_old(Posted 2004) [#1]
Whats the correct method to navigate through a set of images in an anim frame.

Currently I use both keyhit() and KeyDown(), keyhit() to change what frame I'm on in an anim image and keydown() to move the player.

What I would like to know is if I move the player left and right or up and down, what is the correct way of changing the frame to correspond with the direction?

Thx for your help.
:)


ImaginaryHuman(Posted 2004) [#2]
You just pass an extra paramter, ie `frame number`, to the DrawImage command, for rendering it. As for what sequence of animations you do to `walk` or run, you just want to move your character a little bit and cycle the frame number around.