• 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!

Rookie image_index Question

S

SmallyBiggs

Guest
If the following code must be placed in the step event, :
Code:
if hspeed > 0
{image_index=spr_bird_right}

if hspeed < 0
{image_index=spr_bird_left}
how do I prevent it from not playing the sprites animation? At the moment the object moves, but the sprite's animation doesn't play.

Thanks!
 

obscene

Member
You are confusing sprite indexes and image indexes.

Sprite Index: spr_bird_left

Image Index: 0 , 1 , 2 , 3, etc.

Image Speed will automatically cycle the image index at whatever speed you set.
 
S

SmallyBiggs

Guest
You are confusing sprite indexes and image indexes.

Sprite Index: spr_bird_left

Image Index: 0 , 1 , 2 , 3, etc.

Image Speed will automatically cycle the image index at whatever speed you set.
Aha! Thanks!
 
Top