- How to make two characters speak to each other
- How to prevent characters speaking over each other
- I will be able to construct a conversation in Scratch
- I will be able to explain the importance of the wait block
In this lesson you will be creating a conversation between two sprites.
Finished product
You can see a preview of the finished game below:
Renaming our sprite
Before we start to make our conversation, lets rename our cat sprite to Cat. At the bottom right you can see that he is called Sprite1, change this to Cat.
Add another sprite
We first need to add another sprite into our conversation.
Click the Choose a Sprite icon at the bottom right.
Find the Bat character for your conversation. Add them into your Scratch project. Make sure you rename it from Sprite2 to Bat.
Making our cat speak
To make our characters speak we need to first add the when clicked event block.
Next, we need to search for the say Hello for 2 seconds block under the Looks tab.
When you have found it, drag it underneath the when clicked block so that it clicks.
You should now see your cat say Hello:
Making our bat speak
We now need to add the same blocks to our Bat.
We can drag the existing blocks from the Cat to the Bat by just pressing down on them with the mouse and then pulling that over to the Bat sprite.
Preventing our characters speaking over each other
At the moment your characters are speaking at the same time.
To stop this we need to have one character wait while the other character speaks.
To do this, we need to look for the wait 1 seconds block under the Control tab.
Letβs add this block to our Bat so that our Bat's conversation and Change the 1 second to 2 seconds so that it looks more like:
You should notice now that the bat waits for the cat to finish speaking before speaking.
Over to you
- Create a new conversation where one character tells a joke and the other character responds.
- Add two sprites of your choice β make them different characters to the example before.
- Use the say Hello for 2 seconds block and the wait 1 seconds block to make the characters talk one after the other β you donβt want them talking over each other.
- Make your conversation messages creative!
- After completing it, share your conversation with someone else in the class
-
1
Upload your screenshot below:
-
2
What happens if the wait block is not added to the bat when the cat speaks?
-
4
What happens if you use the say Hello block instead of the say Hello for 2 seconds?
-
5
What other sprite(s), other than the cat did you use?
-
6
How well do think you completed this task?
-
7
What parts of this task, if any, did you struggle with?
- Try adding in another character in to this conversation.