Please update your browser
Your browser version is not supported by this site. CS First may not work properly.
In this video, you will learn
how to make the sprite talk about the prompt you selected.
To make the android talk or move,
add code to the scripts editor for the android sprite.
Click on the android in the looks menu.
Drag out a say for two seconds block.
Click the block to test it.
The android says hello.
Click inside the white space
in the say for two seconds block.
The text hello automatically highlights.
Think about the story prompt you chose
and type in a sentence that starts to answer that question.
This example start with
the game character most like me is Yoshi.
Your sentence might start with
my favorite game is
or I think kids should play fewer video games because...
Write a sentence that makes sense
for the prompt you selected.
Drag out another say for two seconds block
and move it under the first block until it snaps into place.
Change the text in the second block
to the next sentence for your story.
Click the entire stack of blocks
to try it out in your program.
Great, the android says the text in the first block
then says the text in the second block.
Computer scientists, like you, test their code often
as they build it so they can find and fix
unexpected behaviors as soon as possible.
Try your code often as you build.
Add more say blocks to the stack to tell your full story.
When you have a story you like,
make it easy for users of your program
to start your story when they click the flag.
Click the events menu and drag a when flag clicked block
to the top of the stack.
Now, the user can start your program by clicking
the green flag at the top of your project.
Try it out.
The story begins when the flag is clicked.
Explore the other blocks in scratch
to add more to your story.
Use motion blocks like glide and move
to make your android take action.
Try sound blocks and forever loops
to create a music track for your program.
You can always click on a block to try it out
before you use it in your program.
So don't be afraid to explore and use your imagination.
Now it's your turn.
Add at least three say blocks that respond
to the prompt you selected.
Add text to the blocks to tell your own story.
Add a when flag clicked block to the top of the stack
to make it easy to start your program.
Before moving on to the add-ons,
take a moment to make sure you are signed in
to the CS First website.
If you are not signed in, you won't receive a digital badge
or completing this activity so be sure to sign in.