Computer Science Canada

How to use a series of sprites to make it look like someone is walking

Author:  ZZK [ Sat Dec 18, 2010 11:17 am ]
Post subject:  How to use a series of sprites to make it look like someone is walking

For my game, i need to make mario walk, i have found 8 images that make it look like Mario is walking. I know i need to make a array, but i dont know how to impletment it and i don't know how to use the array as well as the boolean, or the counter that i need.

Author:  Insectoid [ Sat Dec 18, 2010 12:29 pm ]
Post subject:  RE:How to use a series of sprites to make it look like someone is walking

Well, load the images in an array. Keep a counter incrementing in the loop. Every time you Sprite.Animate(), change the image to the one at array[counter]. Once you get to the last image (7), reset counter to 0. Repeat.


: