In this program, the collision should cause the star to disappear and the spaceship to return to (0, 0).

  • Click Run and use the arrow keys to control the spaceship. Watch the stage to see what's wrong.
  • Debug the program so that the sprites do the correct actions when they collide.

In a collision event, the sprite is whichever sprite's name is in front of the event handler (spaceship).

The hit_sprite is any other sprite on the stage (star1 and star2).

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)