You are on page 1of 4

Christmas Tree Decorating Scratch

Worksheet
Use your coding skills in Scratch to create an animated game to decorate a Christmas tree.
When the game is complete, the user will be able to click on a bauble to change its colour
and make it follow the mouse-pointer. Pressing the spacebar will reset the game and return
the decorations to the bottom of the screen.
Getting Started

In this activity you will learn to:

• ● use coding blocks to write algorithms

• ● create a backdrop

• ● change a variable to make a sprite


follow the mouse

• ● use the spacebar to reset an activity

Open Scratch

https://scratch.mit.edu/projects/editor/?tutorial=getStarted

From File, start a New project.

Delete the Tutorial screen, the cat sprite and the sound effect that appear automatically
when a new project is started.

Step 1: Create a Christmas Tree Backdrop

Go to the Add a Backdrop icon and choose


to Paint a Backdrop.

The Backdrops tab will open in the middle


of the screen and you can use the drawing
tools to create your own Christmas tree.

Use the line tool to draw your tree and the


fill tool to colour it in. This tree was drawn
by layering different sections but you could
draw any sort of Christmas tree you want
to. Get creative and have a go!

Page 1 of 4 visit twinkl.com


Christmas Tree Decorating Scratch Worksheet

Step 2: Add a Ball Sprite

Click on the Add a Sprite icon to access the


sprite library.

Add the following sprite: Ball

The ball will appear in the middle of the


stage. Click and drag it to place it near the
bottom of the Christmas tree.

Repeat these steps until you have placed 5


balls on the screen.

Top Tip: If you right click on the ball


sprite, you can use duplicate to easily
make 4 more ball sprites.

Step 3: Add a Star Sprite

Click on the Add a Sprite icon to access the


sprite library.

Add the following sprite: Star

The star will appear in the middle of the


stage. Click and drag it to place it near the
bottom of the Christmas tree.

Page 2 of 4 visit twinkl.com


Christmas Tree Decorating Scratch Worksheet
Step 4: Code the Star

Click on the star sprite.

Select the Code tab on the main screen.

Use the code to make the star follow the mouse-


pointer.

Change the variable in the Go to box to be


mouse-pointer instead of random position.

Top Tip: the x and y numbers may look different


in your code. These numbers will match the
position of your star on your screen. You do not
need to change them to match the code below.

When you have written your code, click on the


star. Move the mouse-pointer and click at the top
of the tree. What happens to the star?

Press the spacebar. What happens to the star?

Step 5: Code the Ball Sprites

Click on the first ball sprite.

Select the Code tab on the main screen.

Use the code to make the ball change colour


and follow the mouse-pointer. In the code, the
number 30 is used but you could investigate
other numbers. What happens to the different
colours you can make when you change the
number?

Top Tip: The x and y numbers may look different


in your code. These numbers will match the
position of your ball on your screen. You do not
need to change them to match the code below.

Repeat the same steps for the other 4 balls.

Page 3 of 4 visit twinkl.com


Christmas Tree Decorating Scratch Worksheet
Step 6: Play Your Game

Make your stage full screen.

Click on a decoration and see what happens


when you move your mouse-pointer.

Use the spacebar to reset the decorations to the


bottom of the screen.

Challenges:

1. Can you add an effect to the star so that it changes in some way when it is clicked
on?

2. Try adding sound effects into your Christmas tree decorating game.

Page 4 of 4 visit twinkl.com

You might also like