In this lesson we will transport ourselves through time! By clicking on different characters we will find ourselves surrounded by dinosaurs or looking at a space city!
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.
We'll start off in modern times so add the 'Hall' backdrop from the backdrop library (as this is a modern scene).
To add a backdrop from the backdrop library follow these steps:
You can use search box or the filter links (Fantasy, Music, Sports etc) to locate your backdrop.
Add the sprite called 'Dee' from the sprite library.
Drag the sprite to the left of the stage area (by holding down the left mouse button and moving your mouse).
Dee will say some instructions at the start. He will tell us how to transport to different time periods.
Add the following code to the Dee sprite:
when green flag clicked
switch costume to [dee-b v]
switch backdrop to [Hall v]
say [Hi I'm Dee and I have a time travel machine!] for [4] secs
say [Click on one of the items below to transport to that time!] for [4] secs
As there is a lot of text to put in for what the character will say, it's a good idea to learn how to copy and paste text as this will save you a lot of time!
How to copy and paste text:
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.
We're going to create and use a variable called 'time' to set what time period to transport to. When we choose a time period, we will set the value of the 'time' variable and that will change the scene and characters based to that chosen time period.
After you create the variable, add the set [time] to now block to the boy sprite, underneath the when clicked block.
when green flag clicked
set [time v] to [now] // insert this block here
switch costume to [dee-b v]
switch backdrop to [Hall v]
say [Hi I'm Dee and I have a time travel machine!] for [4] secs
say [Click on one of the items below to transport to that time!] for [4] secs
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'.
Our first time period will be the time the dinosaurs roamed the earth! Add the 'Jurassic' backdrop from the backdrop library.
To add a backdrop from the backdrop library follow these steps:
You can use search box or the filter links (Fantasy, Music, Sports etc) to locate your backdrop.