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
Sprite animations and static frames
Moderator: Stef
Re: Sprite animations and static frames
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
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
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sprite animations and static frames
Exactly, you have to handle the sprite animation by yourself then, using 0 as timer value in the resource declaration