Lesson 4.5: Stories in Scratch, Introducing Characters

Learning Objectives:
• Students will become comfortable with creating new sprites.
• Students will us 'broadcast' blocks so that they can engage in conversations.
• Students learn how to use Say and Wait in Scratch to make sprites interact with one another.

Do Now:

Now that we have a better understanding of how sprites in scratch can engage one another in basic terms, we can now learn other ways they can interact, like carrying on a conversation. Why don't we start by having a sprite introduce itself to us. Let's have him say "Hello world!"

Now, we can take things a little further. Let's have our sprite appear off in the distance and then walk towards us. Because of the way perspective works, he should start at a small size and then gradually grow larger as he comes closer to us. Once he is front and center on the screen, he will give us his message.

To do so:

1) Start a new Scratch template.

2) Move the sprite to the coordinates x = -213 and y = 0.

3) To show that the sprite is coming from a distance, we will make him look small at first. To do this, go to the Looks tab and find the 'set size ___%' block. Enter the input of '40' into the block and notice how the sprite gets smaller.

4) For now, lets directly attach the 'go to x:__ y:__' block and the 'set size ___%' block on the 'When clicked' block. Using those blocks, the size and position of the sprite will always be reset to this initial size and position.

Explore:

Now that we have a better understanding of how sprites in scratch can engage one another in basic terms, we can now learn other ways they can interact, like carrying on a conversation. Why don't we start by having a sprite introduce itself to us. Let's have him say "Hello world!"

Now, we can take things a little further. Let's have our sprite appear off in the distance and then walk towards us. Because of the way perspective works, he should start at a small size and then gradually grow larger as he comes closer to us. Once he is front and center on the screen, he will give us his message.

To do so:

1) Start a new Scratch template.

2) Move the sprite to the coordinates x = -213 and y = 0.

3) To show that the sprite is coming from a distance, we will make him look small at first. To do this, go to the Looks tab and find the 'set size ___%' block. Enter the input of '40' into the block and notice how the sprite gets smaller.

4) For now, lets directly attach the 'go to x:__ y:__' block and the 'set size ___%' block on the 'When clicked' block. Using those blocks, the size and position of the sprite will always be reset to this initial size and position.

Activity 1: Sprite Movement
Now, we want the sprite to come front and center on the stage, and while he is coming towards us, we want him to be steadily growing in size so that we get that sense of perspective. To have the sprite reach front and center smoothly, we can use the 'glide __ sec to x:__ y:__' block in the Motion tab to have the sprite move the coordinates x = 0 and y = -100 over a period of 3 seconds.

Activity 2: Sprite Increase
Since we want our sprite to be simultaneously increasing in size as it is coming to the middle of the stage, we can add another 'When clicked' block. We can then add a 'Change size by __' block which is located in the Looks tab. We can set the change size variable to 1 for a smooth increase. Now, if we want to continually increase the the size of our sprite by 1, we can get a 'Repeat __' block and input the variable 90 so that our sprite gets pretty large. Let's nest the 'Change size' block into the 'Repeat' block and then attach the 'Repeat' block to the 'When clicked block'.

Activity 3: Sprite Speaking

Finally, we want our sprite to introduce itself to us. Let's go get the 'say __' block from the Looks tab and input "Hello World! My name is Chat Cat!" We can now attach the block below the 'Repeat' block so that the sprite will say its message after it is done growing. Now, if we run the program, we can see that the sprite will come to the front of the stage and introduce itself. Now you can go make your own introduction.

Lesson 4.5 Wrap Up:
Go Further!

Now try creating your own story, joke, or play using the tools you just learned. Here is one we made an an example: Dino and Do

•