STEP 17: Let's add a collision event that will test for which hit_sprite that speedy collides with.

  • Go to and drag Collision with Other Sprite to the bottom of your program.
  • Change the name in front of the event handler to speedy.
  • Find the line: my_var·=·hit_sprite.get_image_name() and change the name of the variable to image.
  • Change the variable in the if statement to image.

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)