Skip to content

Please update your browser

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

arrow_back Complimenter les concurrents

Transcript

In this add-on, you’ll program your athletes to compliment one another’s moves after they finish performing. In this example, athlete2 is going to show athlete1 some love by shouting out their favorite move.

Click on athlete1. Drag out a “broadcast” block from the events menu, and snap it to the bottom of the performance block stack. The “broadcast” block sends a message to 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 “athlete1 done” because it will signal when athlete1 is finished performing so other sprites in the program can run code. Next, add code to shout out athlete1’s favorite move. Click on the athlete2 sprite. Every “broadcast” block needs a “when I receive” event, so when "broadcast" sends a message, a sprite will receive the message and run code. From the events menu, add a “when I receive” block, and make sure the 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. Decide what 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! After athlete1 finished its moves, athlete2 gave it a compliment.

Here's the game plan: Add a “broadcast” block at the end of the 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 of your CS First Host or Guru.

Choisir une extension
Musique
Ajoute de la musique qui sera jouée lorsque les athlètes présentent leurs mouvements.
Présenter tes mouvements
Programme les athlètes pour qu'ils s'animent et se déplacent sur la scène.
Couleurs changeantes
Fais changer de couleur les lutins un peu comme les athlètes qui portent des maillots différents.
Booster la prestation
Programme le commentateur sportif pour qu'il encourage les athlètes.
Complimenter les concurrents
Fais admirer les mouvements de leurs concurrents par les lutins.
Ajouter un autre athlète
Ajouter un autre athlète au projet.
arrow_backward Retour
Suivant arrow_forward
Instructions
  1. Regarde la vidéo de présentation.
  2. Défile vers le bas pour voir les extensions proposées.
  3. Sélectionne une extension et commence la création !
  4. Choisis une autre extension et continue à créer.