Create a new Scratch project and delete the cat sprite
Go to the Scratch website using the link below and click on the 'Create' link in the blue bar at the top.
By default, each new project starts with the cat sprite already added. To delete the cat click on the x in the blue circle beside the cat in the sprite list.
Create a new sprite by clicking on the paintbrush, this will open up the sprite editor. To draw draw a red circle, follow these steps:
You can create your own sprites using the sprite editor. To create a new sprite put your mouse over the Choose a Sprite button and then click on the paintbrush.
This create a blank sprite and will open the sprite editor where you can use the tools to create your sprite. You can even create extra costumes for your sprite!
Tip: give your sprite a name so that you can recognise it in the code blocks.
We now need to create two more costumes for this sprite, a green circle and a blue circle.
Duplicate the red costume twice and then use the paint bucket tool to change the colour to blue and green.
Don't forget to name the costumes 'blue' and 'green'!
Using the sprite editor can be tricky the first time, it can be helpful if the more experienced students help the less experienced ones!
Now that we've created our sprite, let's start coding!
We're going to code 100 dots to appear so we need a variable to let us count to 100. Using the Variables toolbox create a 'count' variable.
Add the following code to your sprite to start 'count' at 0.
when green flag clicked
set [count v] to [0]
In the Variables palette, create a new variable by clicking the 'Make a Variable' button.
Once you click this button a box will appear asking what you want to call your variable. Give it a name that reminds you what you will be using it for. For example, if you wanted to keep track of your score in a game, you would create a variable called 'score'.
Next we'll code the dot sprite to be cloned 100 times. We'll use a repeat until block and also the 'count' variable to do this. Each time we clone the sprite we'll add 1 to the 'count' variable. When the 'count' variable is greater than 99 then we'll have created 100 clones.
Add the following code underneath the code from the previous step:
when green flag clicked
set [count v] to [0] // insert the new code below this
hide
repeat until <(count) > [99]>
wait [0.1] secs
create clone of (myself v)
change [count v] by [1]