
Originally Posted by
yaustar
Well I fixed as much as I could without changing all the code but there is a BIG problem with the way you are handling your frame animation.
Each animation at present has a different number of frames, for example attack has 2 and movement has 3 but you are using the same frame counter (W_FRAME) to access the table/array of images.
Imagine
You move right, you are now using Run_r[W_FRAME] where W_FRAME is 3 as your state. You hit attack, now it tries to assign attack_r[3] to state which doesn't work because attack_r[3] doesn't exist to blit.
Another problem is the way you are naming your variables. Some start in lower case whilst others in upper case eg:
Run_r and attack_r
Keep to one style.
Bookmarks