Adding more characters to your story adds to the drama of the plot. It creates more
fun or conflict in your story. In this video, you will add a third character using a “broadcast” block.
To begin, add a new character or object.
Program the sprite to make an appearance using blocks from the motion menu.
Adding a “go-to x y “ 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.
You can sequence the new sprite using “wait” blocks, but, “broadcasting” makes this easier.
Broadcasting sends signals about the code from one sprite to another.
Select the character that’s last to speak,
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, add a “when I receive” block to the top of its code stack.
Make sure the message matches the name in the “broadcast” block.
Great! 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
to your story.
Test your code often, so you catch bugs along the way.
Feel free to share your project with you classmates!
Sign in to track your progress and earn badges