Scratch Silver III
Scratch Silver II
SCRATCH SILVER I
SCRATCH GOLD III
1 of 3

2.04 Animation using loops

Another way to animate the spaceship is to tell it to move a small amount many times

Delete the glide block from your code. To do this, drag the block off the Code area and drop it back where the other single code blocks are.

Spaceship sprite

Now use a repeat block to move your spaceship towards the Earth.

Testing a spaceship animation
Spaceship sprite

Test and save your code. Your spaceship should move towards the Earth exactly as before, but this time it uses a repeat block.

Next add code to your spaceship sprite so that the spaceship changes colour as it moves towards Earth?

Use this block:

Spaceship sprite

Test and save your code.

Testing a colour-changing spaceship

Can you make your spaceship get smaller as it moves towards Earth?

Test and save your code. Your spaceship should now get smaller as it moves. Test your spaceship a second time. Is it the right size when it starts?

Testing a shrinking spaceship
×
×

Cart