Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more.

Transcript

In this add on, you'll add a third sprite to your story, using a broadcast block.

So far you've sequenced dialogue using weight blocks.

Now, that works great with two sprites, but it can get pretty complicated in longer stories, and in stories with more than one character.

The broadcast block makes complex stories easier to organize.

To start, plan for a third sprite in your story.

In this example, a sprite will come in at the very end and say a closing line.

Select a third sprite for your project.

This example we'll use a butterfly, but you can select any sprite you like.

Then, program that sprite's actions.

The sprite starts at the top left, then glides to a position next to the duck, it then says, we'll miss you.

Click it to try it out.

Now that the basic programming is in place, it's time to sequence this code with the rest of the story.

You could do this using weight blocks, however, you can also use a broadcast block.

This block broadcasts, or sends signals about the code from one sprite to another.

The butterfly should run this code after the duck finishes talking.

To do this, select the duck, go to the events menu, and place a broadcast block on the end of the block stack.

Click the drop-down menu, and select new message.

Name the message something that describes what the code will do.

This example, we'll use butterfly's entrance.

When the broadcast block runs, it will send this message to other sprites.

The butterfly now needs to be programmed to receive this message.

Click the butterfly, click events again, and drag out a when I receive block.

Make sure the message name matches the name in the broadcast block.

In this example, it will be butterfly's entrance.

Try it out.

Great, it works.

But the sprite should go to the top left corner at the beginning of the program.

Drag out the go to block off the broadcast block, and instead have this code run when the green flag is clicked.

Great.

Now it's your turn.

First, add a third sprite to your story, and then use the broadcast block to program your new sprite to do something in your story.

Choose an Add-On

Add a Title Screen

In this add-on, you will design and program a title screen that will appear at the start of your story.

Costume Animation (Part 1 of 2)

This add-on will show you how to animate your characters using costumes and some new “looks” blocks.

Costume Animation (Part 2 of 2)

This add-on will show you how to animate your characters using costumes and some new “looks” blocks.

Adding Motion (challenge)

In this add-on, you'll be introduced to the "glide" block, which you can then use to add motion to your story.

Add a Third Character

In this add-on, you'll add a third sprite to your story using a "broadcast" block.

Add a Second Scene to your Story (challenge)

In this add-on, you’ll learn how to add a second scene to your story, then you’ll program the dialogue in that scene on your own.

Instructions
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!