How to create flying/falling objects in Scratch

In this tutorial we will get a spaceship to fall from the top to the bottom of the screen.

scratch_FlyingRocket

Add the following code to your sprite (e.g. Spaceship):

scratch_FlyingRocketScript

xy-gridTo understand this script you need to understand how x and y coordinates work in Scratch.
When using scratch the “playing area” is based on the following grid:

  • The centre of the grid is (x=0, y=0)
  • The bottom left corner is (x=-240, y=-180)
  • The top right corner is (x=240, y=180)

 

You can download this helpsheet as a pdf: How to create flying or falling objects in Scratch

Did you like this challenge?

Click on a star to rate it!

Average rating 1.5 / 5. Vote count: 8

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: , , ,