Skip to content

Please update your browser

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

Beachte bitte: Dieses Thema wurde nicht für Scratch 3.0 aktualisiert. Lies diesen Hilfeartikel für weitere Informationen.

arrow_back Blueprints (Part 1 of 2)

Transkript

Ready for a challenge?

Step up to this add-on, which will guide you through a new concept: creating a list.

Use your curiosity and persistance, as you complete this add-on.

Once you have finished this add-on, your users will be able to save their projects in Scratch.

To start, save the X and Y location of the stamp, each time it is placed.

To do that, make a list that records the X position of the sprite, and a different list, that records the Y position of the sprite.

Start by creating a list for the arch sprite.

To make a list, click on make a list.

Give the list a name that makes sense, such as arch X.

Make sure to check off for all sprite's, otherwise your lists will only save the X position of the original sprite, not its clone.

Next, make the arch X list save the clones X position when it stamps.

To do that, use the add to block from the data menu, which will add whatever is in the box to the list you select.

In this example, the box says thing.

First make sure the check box next to arch X clicked, so you can see the correct list.

Then click the add to block.

Thing shows up in the arch X list.

That was just a test.

Your list should keep track of the X position of the arch when it stamps.

So it shouldn't say thing.

To remove thing from the list, click on the orange box with thing in it, then click the X next to it.

Place the add to block, just after the stamp, but before the clone gets deleted.

Right now it still adds thing to the arch X list.

Next, you will make it save the X position of the sprite in the list.

To do that, drag the X position variable from the motion menu, to the spot on the add to block that says thing.

Test this code.

Click on the arch, move it to a position on the screen, and click.

As soon as you click, the X position of the sprite, should show up in the arch X list.

Great!

Again that was just a test, so delete this number as well.

Next, save the sprite's Y position.

This will get its own list with a name that makes sense, like arch Y.

Place a new add to block under the first add to block, that saves the sprite's X position.

Make sure this block is adding to arch Y, or whatever you named the Y position list.

Now place the Y position variable inside the second add to block, where it says thing.

Test the code by stamping the arch sprite, somewhere on the screen.

When you stamp, a number should appear in both the X and Y lists.

If the numbers are the same, check that you have put X position on the arch X list, and Y position on the arch Y list.

If two numbers appeared on one list, and no number appeared on the other, check that one add to block is saving to arch X, and the other add to block is adding to the arch Y list.

Stamp the arch again.

A second number should appear on both lists.

In part two of this add on, you will learn how to use these lists to recreate an image.

Now it is your turn.

Create a list for a sprite's X and Y position.

And add the X and Y positions to the correct lists, after the sprite's stamps.

Erweiterung auswählen
Die Abdrücke sich drehen lassen
Programmiert, dass die Abdrücke mit den Pfeiltasten nach rechts und links gedreht werden können.
Die Figur sich nach unten bewegen lassen (Part 1 of 2)
Programmiert ein Spiel, in dem mit herabfallenden Teilen ein Gebäude gebaut wird.
Die Figur sich nach unten bewegen lassen (Part 2 of 2)
Programmiert ein Spiel, in dem mit herabfallenden Teilen ein Gebäude gebaut wird.
Die Figuren die Farbe wechseln lassen
Lasst die Figuren in eurem Projekt die Farbe wechseln.
Die Figuren die Größe ändern lassen
Lasst die Figuren ihre Größe ändern.
Das Bühnenbild verändern
Passt den Hintergrund an den Stil eures Gebäudeentwurfs an.
Blueprints (Part 1 of 2)
Blueprints (Part 2 of 2)
arrow_backward Zurück
Weiter arrow_forward
Anweisungen
Seht euch das Einführungsvideo an, um zu erfahren, welche Erweiterungen es gibt, und klickt dann auf „Ansehen“, um eine davon auszuprobieren!