Home

Home

 Print This Lesson


SCRATCH TUTORIAL     SPACE SHUTTLE MISSION STS-2020
Lesson 7     Create a Docking Light Sprite and Script to Dock the Shuttle

  • Description. This lesson we will create a Sprite and Script to dock the Shuttle.

    If you haven't already, Launch the Scratch program from your desktop.
  • Let's get started!!!

  • We will be using the freedom background. Click on the Stage icon, Select the freedombg.
To get to the Shuttle sprite interface, in the Sprite list, Click on Shuttle icon

  • Create a Docking Light Sprite.







To make a docking light we will paint it.

In the Sprite List area, click on the Paint button.


For my light I used the circle tool to draw a yellow circle.

Don't worry about the size, you can use the Grow sprite and Shrink Sprite buttons when we get it on the backgroud

Click OK when you are done.





When you clicked OK it created a new sprite and named it Sprite1.

The new Sprite is in the middle x:0 y:0.

Drag the Sprite to where you want it.

Use the Grow Sprite and Shrink Sprite buttons to resize until you get it the way you want.

When you are done





Click on the tab.

Let's rename it docking light.

We will make the light flash so we need 2 more costumes, Red and Green.

Click the Copy button to create a Red costume.
Then click the Edit button and paint it Red.

Repeat to make a Green costume.

Rename the costumes.

When you are done







  • Create Script to tell the Shuttle what to do when it touches the docking light.
Description A script to tell the Shuttle to wait until it touches the docking light and it's direction is 90 (up), then play a sound and broadcast the message docked.


Grab these blocks. Follow the arrows to snap them together.



Snap these stacks together.







Test it. Rotate the Shuttle to 90 (up), move the Shuttle until it touches the docking light.
You should hear the pop sound.
If you don't hear the sound, check to make sure you have the blocks stacked correctly, and the shuttle is at 90.

  • Create Script to contol the docking light
Description: When the Shuttle touches the docking light, we want it to stop flashing and turn green.

To get to the Docking light interface, in the Sprite list, Click on the docking light icon

Grab these blocks. Build this stack.




Test it. Rotate the Shuttle to 90 (up), move the Shuttle until it touches the docking light.
The docking light should turn red and stop flashing.
If it dosen't, check to make sure you have the blocks stacked correctly.

To test that the docking light will turn green when the Shuttle broadcasts the message docked you have to click the Green Flag here to run all the script.

Remember, the Shuttle direction has to be 90 (up) and it has to touch the docking light, before the docking light will turn green.