Sprites can move in different directions across the screen
but, sometimes you may want a stationary sprite, as an
obstacle or decoration.
In the case of the following example, the sprite is acting
as smoke from a chimney.
For this tutorial you will need to open up the snapshot
If you don't have it already, head to the Loading Screech Downloads page and click on <5 Min BASIC ZX which contains the snapshot.
Once you have opened up the snapshot, navigate in AGD
to Events > Sprite type 4.
You should be looking at the following code;
IF A = 0
ADD 1 TO G
IF G = 4
LET G = 0
The purpose of A is to count every frame.
The usual sprite animation speed is too fast for a meandering chimney plume so, on the first frame (A=0, computers count from zero instead of one) 1 is added to a second variable, G.
Only when G=4 is the sprite animated by one frame.
After the type 4 sprite is animated, the G variable is returned to
0 and the count starts again.
1. Delete everything in Sprite type 4 apart from;
Now run the game (Press X. on the main menu) and see how
the speed of the animation has changed.