Legacy GM [SOLVED ]Sprites Stop Animating Need Help

D

dawson2223

Guest
I'm using a sprite for north, south, and the same sprite for east and west, just flipping the xscale.
The animation for the south sprite works fine.

When I try to go in a different direction, the object goes to the correct sprite, but it doesnt animate anymore. So it goes to the proper sprite I assigned and moves, but it doesn't do its animation, it just stays on the first image.

I'm attaching a screenshot of the coding.

Anyone know how to fix this?

Thanks
 

Attachments

obscene

Member
Your else statement is only applying to the last IF, so if vspeed is not > 0 your image index will be set to 0 regardless of any of the previous statements.

The proper way is...

if this
else if this
else if this
else if this
else that
 
D

dawson2223

Guest
I got my character to animate the way I want to for a topdown. I'm using a sprite for north, south, and the same sprite for east and west, just flipping the xscale.

But when I try to go in a different direction, the object goes to the correct sprite, but it doesnt animate anymore. So it goes to the proper sprite I assigned and moves, but it doesn't do its animation, it just stays on the first image.

I'm attaching a screenshot of the coding.

Anyone know how to fix this?

Thanks
Your else statement is only applying to the last IF, so if vspeed is not > 0 your image index will be set to 0 regardless of any of the previous statements.

The proper way is...

if this
else if this
else if this
else if this
else that


That worked! Thanks so much!
 
Top