I have an animated sprite animal character that runs across the screen using the arrow keys.
It is a series of 7 individual frames. The first frame is its "sitting" position, which is as of now only called when the program starts.

I want the animal to return to it's sitting position whenever it stops running.

What is the best way to accomplish this?

I know this should probably go in the game dev forum, but I am using C++ to code and it seems like that forum is FAR weaker than this one. The C++ one seems to dominate all others by an incredible margin...and I don't really want to wait a week for a reply if I don't have to.

Thanks for any help!

Assuming just putting a if(!key[KEY_RIGHT]) statement for all the arrow keys to set the frame to the "rest position" frame is the best way to do it, this is solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.