We've all read stories before and even come up with our own, but how do you code a story in Scratch? In this lesson we go through what you need to know.
For this lesson we're going to create a simple baseball story to help us understand the different story telling things we can do in Scratch.
Open the Scratch website and create a new project. 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.
The first thing to think about for a story is the "when" and the "where", this is called the setting.
In Scratch we use the backdrop to set the scene. Add the "Baseball 2" backdrop to your project.
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.
After setting the scene we now need to add the characters that are in our story.
Add the "Pitcher" and the "Batter" sprites to your project from the sprite library.
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.
The plot is the events that happen in our story. You can split a plot into the beginning, the middle and the end.
In our baseball story the plot will be:
The characters joke with each other.
The pitcher throws the ball and the batter hits it
The ball is seen flying through the air and then space!
The pitcher is going to start our story off by saying "Here comes the speed!"
Add the following code to the Pitcher sprite:
when green flag clicked
go to x: (-150) y: (0) // this puts him in the correct position
say [Here comes the speed!] for (2) seconds
Click on the green flag to test your code.