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 will add some more characters to your commercial. Commercials usually have several characters that interact with each other and with the product. If one character has a product, for example, and another one admires it, it might make people feel like they want to have it, too. This video will show you how to add another sprite. It will then be up to you to program the sprites to interact with the android in the commercial. First, click “choose sprite from library,” and add someone you like. This example uses “Sam.” Then, add code to the new sprite.

In this example, Sam glides towards the athlete and says “Wow, I love your watch! I wish I had one!” Click the stack to test it. Add a “when I receive” block from the “events” menu to the top. Select “new message” from the dropdown, and type something descriptive, like “enter crowd.”

Select the athlete sprite, and insert a “broadcast enter crowd and wait” block when you want the crowd to appear in the commercial. Test it out.

There’s a bug: the new sprite should only be visible when it’s time for it to appear.

In the new sprite, add a “show” block at the beginning of the stack, and a “hide” block at the end. Then, add a “when flag clicked” block, followed by a “hide” block. Test the code again. Great, it works! Feel free to add more sprites. This example has another sprite that glides in with Sam and says “Me too!” Make the new sprite’s block stack run with the same “when I receive” block. Use “wait” blocks in both sprites’ code so that they never talk over each other. To make the athlete sprite respond to the crowd, add a “when I receive enter crowd” block. Use “say” blocks to make the athlete say something back and “wait” blocks to make sure the athlete doesn’t talk at the same time as the crowd. This video shows just some of the ways you can use other sprites in the commercial. It’s up to you to decide which sprites to add, how they should move, and what they should say. Have fun and be creative!

Now, it’s your turn! Add another sprite to the commercial.

Add code to the new sprite to make it interact with the athlete.

Use “broadcast and wait,” “when I receive,” “show,” and “hide” blocks to determine when the new sprites should appear. Add more sprites, and make them interact with the athlete using “wait” and “say” blocks.

Choose an Add-On
play_circle_filled
Happy Dance
Program the sprite to dance.
arrow_forward
play_circle_filled
Changing Scene
Move the android through different scenes to see how the gadget reacts.
arrow_forward
play_circle_filled
Weatherproof
Add weather effects to show how rugged the gadget is.
arrow_forward
play_circle_filled
Purchase Decision
Ask the buyer to purchase the object.
arrow_forward
play_circle_filled
Admiring Crowd
Add more sprites to the project to interact with the athlete.
arrow_forward
play_circle_filled
Fitness Coach
Code the sprite to have a pulse and talk about its heart rate.
arrow_forward
arrow_backward Back
Next arrow_forward
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!