• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker 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?
 

T2008

Member
Sorry, I just got your response. I've been very busy lately and had to take a break. I really appreciate our responding. As soon as I can work on this again, I'll try your suggestion. Thank you so much!
 
Top