STEP 6: Now the Codester is behind the UFO. We'll use an event to make something happen when they hit!

  • Go to . Drag Collision into your program.
  • Click Run to see what happens when the UFO hits the Codesters sprite.

The collision event causes the program to do something when our sprite touches another sprite.

stage.set_background("space") sprite = codesters.Sprite("ufo") sprite.set_size(0.4) sprite.go_to(-200, -200) sprite.pen_down() sprite.glide_to(-100, -100)