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 Modifie ton circuit


Racing around the same old track all day could get pretty boring. Use this add-on to change up the venue for your racing sprites. In this video, you’ll learn how to add a button that you can program to change between the three racetrack backdrops available in the starter project. Watch how it’s done first, then try it on your own.

To start, choose a sprite to be the button for this project, for example, “button 1” like you see here. You can choose any sprite you want for your project.

This button is pretty large, so use the shrink tool to make it smaller, and drag it into the corner of the project. Next, program the button to change backdrops.

Click on looks, select the “switch backdrop to” block, and change the value to “next backdrop.” The backdrops now change when the block is clicked.

Finally, add an event that tells the computer to run this code. The backdrop should change when the sprite is clicked. To make that happen, add a “When this sprite clicked” event.

Try it out! Remember, it’s important to test your code at every step along the way--that’s what computer scientists do to make sure everything is working the way they want it to.

Awesome, the user can click this button to choose a backdrop.

When you are finished, add instructions to the project page to tell your users how to use the new feature. Now, it’s your turn: Add a sprite. Change the backdrop using a “switch backdrop” block and a “when sprite clicked” event.

Choisir une extension
Modifie ton circuit
Ajoute un bouton qui change l'arrière-plan circuit.
Changement de costume
Change l'apparence des coureurs lorsqu'une touche est appuyée.
Appuie sur le champignon (Part 1 of 2)
Change la façon dont les coureurs se déplacent, puis fais-les ralentir sur l'herbe.
Appuie sur le champignon (Part 2 of 2)
Change la façon dont les coureurs se déplacent, puis fais-les ralentir sur l'herbe.
Bruitages d'accident
Joue un bruitage d'accident chaque fois que les coureurs se percutent.
Programme un lutin pour qu'il effectue un compte à rebours pour le départ de la course et qu'il encourage les coureurs.
Trace de couleur
Ajoute un effet de trace de couleur aux coureurs.
arrow_backward Retour
Suivant arrow_forward
  1. Choisis une extension, et clique sur le bouton "Regarder" pour découvrir comment la créer.
  2. Quand tu as fini, reviens à l'écran des extensions et essaies-en une autre !