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.

Scegli un’estensione
Danza della felicità
Fai ballare lo sprite.
Cambio di scena
Sposta l'Android da un paesaggio all'altro per vedere come reagisce il gadget.
Intemperie
Aggiungi effetti climatici per dimostrare quanto è resistente il gadget.
Decidi se comprare
Chiedi allo spettatore di comprare l'oggetto.
Folla estasiata
Aggiungi al progetto altri sprite e falli interagire con l'atleta.
Il preparatore atletico
Ordina allo sprite di mostrare il battito e di parlare della sua frequenza cardiaca.
arrow_backward Indietro
Avanti arrow_forward
Istruzioni
  1. Scopri di più sui vari tipi di distintivi che puoi ottenere.
  2. Seleziona le caratteristiche che ti interessano di più.