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 Ein Feuerwerk programmieren (Herausforderung)

Transcript

One of the great aspects of the computer science community is that you can borrow and remix other people’s ideas. One way to do this in Scratch is by using the backpack. In this add-on, you’ll add a fireworks sprite to your backpack, then add it to your program, and decide when to run its code.

Click the fireworks link next to the introduction video on this page. This project contains a fireworks sprite that already contains code. Click the flag to run the code.

Wow! That's pretty awesome. Next, make sure that you’re signed in to Scratch. If you’re not signed in, you won’t be able to add the firework to your backpack.

Open the backpack by clicking the backpack menu at the very bottom of the screen.

If you’ve never added anything to your backpack, it will be empty.

Click and drag the fireworks sprite into your backpack.

Next, switch back to your original project, make sure your work is saved, and refresh the page. Open your backpack again, and drag the fireworks sprite into your project. Click the flag to try it out.

Awesome, the fireworks sprite and all of its code is now copied into your project! It’s pretty distracting to have fireworks playing for the entire program though, so decide when you want these fireworks to play. In this example, the fireworks will play at the end of the story. To do this, broadcast a new message at the end of the story, which is the bottom of the “conclusion” block stack. Call the message something like “end.”

Then, select the fireworks sprite. Replace the “when flag clicked” block with a “when I receive” block, and change the value to “end.”

To play the fireworks during the middle of the story, select a different message, like body or conclusion. Click the flag to test.

Great! The fireworks play at the right time in the story!

Now, it’s your turn: Open the fireworks project next to this video.

Be sure that you’re signed in to Scratch, open your backpack, and drag in the fireworks sprite. Switch back to your original project, refresh, and drag the sprite out of your backpack. Program the fireworks to run by broadcasting and receiving a message.

Erweiterung auswählen
Die Kulisse wechseln
Für jeden Teil eurer Präsentation die Kulisse verändern
Die Innovation umgestalten
Das Kostüm eurer Figur individuell gestalten, sodass es eurer Vorstellung besser entspricht
Ein Feuerwerk programmieren (Herausforderung)
Eine Feuerwerk-Figur zuerst zu eurem Lager und dann zu eurem Programm hinzufügen und entscheiden, wann der Code dieser Figur ausgeführt werden soll
Die Idee schützen
Das Publikum bitten zuzustimmen, keine der Ideen in eurer Geschichte an andere Personen weiterzugeben
Die Lautstärke einstellen
Eure Präsentation durch ein Lied ergänzen und die Lautstärke je nachdem, welcher Teil der Geschichte gerade erzählt wird, regeln
Interaktive Elemente einbauen
Das Ende eurer Präsentation interaktiv gestalten, indem ihr dem Publikum eine Frage stellt und darauf reagiert
arrow_backward Zurück
Weiter arrow_forward
Anweisungen
1. Wählt eine der Erweiterungen aus und programmiert sie!