Page 1 of 1

Sprite animations and static frames

Posted: Sun Sep 24, 2017 10:25 am
by matteus
How do I keep a sprite fixed on a single frame in an animation sequence? I've a 9 frame acceleration gage and I want frames 0, 5 and 9 to act as stop points.

I currently do things like this:

Animation 1 - 1 frame bottom gage point
Animation 2 - 3 frames braking
Animation 3 - 1 frame middle gage point
Animation 4 - 3 frames accelerating
Animation 5 - 1 frame top gage point

Re: Sprite animations and static frames

Posted: Thu Sep 28, 2017 7:12 am
by Staffan
I dont know if there is a certain way of doing this in sgdk, but in my game I set the frames manually and have a counter when its time to change them.
For an example I change from first to second frame when counter reach 20, but from second to third when the counter reach 60 and so on.

Thats how I do it :)

Re: Sprite animations and static frames

Posted: Thu Sep 28, 2017 9:04 am
by Stef
Exactly, you have to handle the sprite animation by yourself then, using 0 as timer value in the resource declaration :)