Adding more characters to your story can create more fun or conflict.
In this video, you will add a third character using a “broadcast” block.
To begin, add a new character or object.
If you want your sprite to face a different direction, select the Costumes tab, and select “flip horizontal.”
Some sprites may also appear bigger than others in Scratch.
Edit the size value in the Sprites pane.
Program the sprite to appear using blocks from the motion menu.
Adding a “go-to xy” block makes the sprite appear in a specific location on the stage.
Move the sprite to where you want it to go using a “glide” block. ...
“Broadcasting” makes it easier to sequence
your code when you have more than two sprites.
Broadcasting tells the computer when to run a block stack.
Select the character that speaks last, and add a “broadcast” block to the end of
that block stack.
Select “new message” and name it something that describes what the code will do.
For the new character to receive this message,
select the sprite...
and add a “when I receive” block to the top of its code stack.
Make sure the message matches the name in
the “broadcast” block.
But there’s a problem… the new character is always on the stage.
To fix this, add a “hide” block...
and a “when flag clicked” block.
Then, add a “show” block after the sprite receives the message to appear.
Add "say" blocks and other "motion" or "looks" blocks to your newly added sprite to continue your story.
Test your code often, so you catch bugs along the way.
Feel free to share your project with your classmates!
Para hacer esta actividad en español, haz clic aquí.
Sign in to save your project and track your progress.