In this add-on, you’ll program your athletes to compliment one another’s moves afterthey finish performing. In this example, athlete2 is going to showathlete1 some love by shouting out their favorite move.
Click on athlete1. Drag out a “broadcast” block from the events menu, and snap it tothe bottom of the performance block stack. The “broadcast” block sends a messageto all the sprites, which then receive the message and run code.
Click on the dropdown, and click “new message.” This example will name the message “athlete1done” because it will signal when athlete1 is finished performing so other sprites inthe program can run code. Next, add code to shout out athlete1’s favoritemove. Click on the athlete2 sprite. Every “broadcast” block needs a “whenI receive” event, so when "broadcast" sends a message, a sprite will receive the messageand run code. From the events menu, add a “when I receive” block, and make surethe message names in both blocks match. In this example, that’s "athlete1 done."
To show some support for athlete1, drag out a “say” block from the "looks" menu. Decidewhat awesome things your sprites will say to show their support. This example says “Woah,that was awesome.” Check it out by pressing the number 1 on the keyboard. Sweet! Afterathlete1 finished its moves, athlete2 gave it a compliment.
Here's the game plan: Add a “broadcast” block at the end ofthe athlete's routine. Place “when I receive” blocks and "say"blocks in the other athletes' scripts. Repeat this same process for each sprite.
Now your athletes will show off their good sportsmanship and compliment one another.
If you have a question or if you need help, ask your neighbor or get the attention ofyour CS First Host or Guru.
Aggiungi una musica di sottofondo mentre l'atleta sfoggia le sue mosse.
Anima l'atleta facendolo muovere per il palco.
Cambia il colore degli sprite proprio come gli atleti cambiano maglia.
Ordina al cronista sportivo di incoraggiare gli atleti.
Fai i complimenti agli altri
Gli sprite si complimentano a vicenda per le loro mosse.