W
Wintermute()
Guest
HI GMS'ers,
I'm struggling to figure out how to animate a 12 frame 2D spaceship I have a model of. It's for use in a top down shooter I've been making. I've been slowly upgrading all the models in my game to fully animated modeled sprites for all the enemies and scenery, but now my main player sprite I have been using sticks out like a sore thumb, flat and lifeless, by comparison.
So i've got a nice 12 frame sprite of a spaceship to use, all gifs, which basically covers the ship tilting it's wings left and right to simulate turning. What i'm stuck with is how to control the animation for it with user movement controls. Up until now I've simply used sprite index to change my enemy and scenery sprites based on game conditions (hit, boosts, explosions, etc) and reset them or destroy them. but now i need to so something very different, ie:
action: Player presses move left
gms: change sprite for player ship so it displays the animation that tilts the ship down to the left
action: PLayer releases move left button
gms: change sprite for player ship so it displays the animation that reverses the previous movement, back to the center (default) sprite.
The tricky thing there that gets me is how to make it so when press left is released, the next animation starts ffrom where the previous one left off - so you get a smooth animation. I hope I explained that clearly enough ?
If anyone has an explanation on how to do this, i'd really appreciate it, thank you !
I'm struggling to figure out how to animate a 12 frame 2D spaceship I have a model of. It's for use in a top down shooter I've been making. I've been slowly upgrading all the models in my game to fully animated modeled sprites for all the enemies and scenery, but now my main player sprite I have been using sticks out like a sore thumb, flat and lifeless, by comparison.
So i've got a nice 12 frame sprite of a spaceship to use, all gifs, which basically covers the ship tilting it's wings left and right to simulate turning. What i'm stuck with is how to control the animation for it with user movement controls. Up until now I've simply used sprite index to change my enemy and scenery sprites based on game conditions (hit, boosts, explosions, etc) and reset them or destroy them. but now i need to so something very different, ie:
action: Player presses move left
gms: change sprite for player ship so it displays the animation that tilts the ship down to the left
action: PLayer releases move left button
gms: change sprite for player ship so it displays the animation that reverses the previous movement, back to the center (default) sprite.
The tricky thing there that gets me is how to make it so when press left is released, the next animation starts ffrom where the previous one left off - so you get a smooth animation. I hope I explained that clearly enough ?
If anyone has an explanation on how to do this, i'd really appreciate it, thank you !