In this lesson we give some instructions to a cat and a bat to make them dance around the screen!
Create a new Scratch project. Notice that your project starts with a cat sprite already added to it and ready to be given some instructions.
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.
We're going to give the cat some instructions to make it dance around in a circle.
First drag the cat up to the top middle of the stage area (by holding down the left mouse button and moving your mouse) and then add this code to the cat sprite:
Click on the green flag that's above the stage area to run your code. The cat should move around the screen in a circle.
To stop your cat from moving, click on the red circle that's beside the green flag above the stage area. This will stop all the code in your program from running.
Knowing what the green flag and red circle do is important for the children to learn.
The green flag triggers any "when green flag clicked" blocks that are in the code to start.
The red flag stops all code in the program from 'running'.
Open the sprite library and add the Bat sprite to your project.
To add a sprite from the sprite library follow these steps:
You can use search box or the filter links (Animals, People, Fantasy etc) to locate your sprite.
When students are doing the initial lessons they will start to become familiar with clicking (left clicking), right clicking and dragging items on the screen.
We're going to make the bat dance by going left and right across the screen. Add the following code to the bat sprite:
Click on the green flag again to run your code. Both the cat and the bat should be dancing now!
Explain to the children what the if on edge, bounce block does; it senses that the sprite is touching the edge of the stage area and it 'bounces' by turning in the opposite direction.