GMS 2 Animation Speed Script

T2008

Member
I define the various sprite indexes through variables in create event (ie spr_stopped_e = stand_e) as well as animation speed (ie ani_spd_stand = 0). I then have a script that defines the animation speed based on sprite index (see below). However, when I run my animation speed script in the objects step event, it won't work. Any ideas as to the problem?

Code:
//Stopped Sprite
if sprite_index = stand_e ||
sprite_index = stand_n ||
sprite_index = stand_ne ||
sprite_index = stand_nw ||
sprite_index = stand_s ||
sprite_index = stand_se ||
sprite_index = stand_sw ||
sprite_index = stand_w {
    image_speed = ani_spd_stand;    
}
 

Nidoking

Member
What is the image_speed after running this script?

You might want to put a show_debug_message inside that if block so you can see whether it's actually called.

Also, you described setting spr_stopped_e in the create event, but where do you assign that to sprite_index?
 
Top