It's Sean!

UK freelance journalist, author
and copywriter Sean McManus

Printed from © Sean McManus.
Home > Books > Scratch Programming in Easy Steps > 10 block demos > How to make a sprite explode

How to make a sprite explode using graphic effects in Scratch

Sean McManus, author of Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps, shows you how to make a sprite explode in Scratch

The graphic effects in Scratch can be used to distort the colour and shape of your sprites, as this picture shows:

An illustration of 8 graphic effects in Scratch

Graphic effects in Scratch, applied to a butterfly sprite to varying degrees.

In that example above, the brightness effect is using a negative number to darken the sprite to a shadow here.

To find the graphic effects, click the Looks button above the Blocks Palette. These are the blocks you use:

change color effect by 25 / set color effect to 0 / clear graphic effects

By default, the color effect is in the blocks, but you can choose the other effects using the menu in the block.

How to explode a sprite

If you use a loop together with a graphic effect to gradually apply it, you can make the sprite appear to transform. Here's an effect that uses the mosaic effect to make a sprite explode into smithereens.

when green flag clicked / show / clear graphic effects / wait 1 secs / repeat 10 / change mosaic effect by 10 / repeat ends / hide

You can make other great transitions and colour effects by changing the effect type from mosaic to one of the others.

Feel free to share that program card on your social networks, or to use this Scratch programming example in your classroom or Code Club.

Try the program

In this example, I've added a sound effect. Click the green flag to explode the spaceship after a 1 second delay.

Find out more...

Find more 10 block Scratch demos here. For more information on my Scratch books and more bonus content, visit the Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps homepages.