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 program the sports commentator to give the athletes a performance boost. First, decide what the sports commentator is going to do to pump up the athletes. In this example, the sports commentator says a few encouraging words to get each athlete to put on a game face.

Click on the commentator sprite. Drag out a “say” block, and change its text to “Get in the zone!” Try it out. Next, drag out a “switch backdrop to” block from the looks menu. This block tells the computer to switch to a specific backdrop.

To select a new backdrop, click on the stage, then the backdrops tab, and select the “choose backdrop from library” icon. Choose any backdrop you like! This program uses the “neon tunnel” backdrop. Switch back to the code by clicking on the commentator sprite, then on the scripts tab. Click on the dropdown menu to see the different backdrops, and select “neon tunnel.” Click the block to try it out. Neat!

Reset the backdrop to its original by adding another “switch backdrop to” block. Click the dropdown menu, and select the default backdrop-- in this case, “building at MIT.”

To set how long the performance boost lasts, drag out a “wait” block from the control menu, and tinker with the value until you like how long it stays in the zone. Keep testing by clicking the block stack. To give the athletes a performance boost at some point in the program, drag out a “when space key pressed” event, and add it to the top of the code stack. Press the space key to see it work.

For an extra challenge, add a sound effect that plays when the performance boost kicks in using a “sound” block. Here's the game plan: Add a “say” block and two “switch backdrop to” blocks to the “when space key pressed event” then, add a “wait” block in between these two blocks.

As an added bonus, add a “play sound” block to add a sound effect to the performance.

Scegli un’estensione
Musica
Aggiungi una musica di sottofondo mentre l'atleta sfoggia le sue mosse.
Movimento
Anima l'atleta facendolo muovere per il palco.
Colori cangianti
Cambia il colore degli sprite proprio come gli atleti cambiano maglia.
Bel colpo
Ordina al cronista sportivo di incoraggiare gli atleti.
Fai i complimenti agli altri
Gli sprite si complimentano a vicenda per le loro mosse.
Aggiungi un altro atleta
Aggiungi un altro atleta al progetto.
arrow_backward Indietro
Avanti arrow_forward
Istruzioni
  1. Guarda il video di introduzione.
  2. Scorri verso il basso per visualizzare i componenti aggiuntivi scelti.
  3. Seleziona un componente aggiuntivo e inizia a creare!
  4. Scegli un altro componente aggiuntivo e continua a costruire.