Activity: Hide Hit Sprite
I'M FINISHED WITH HOUR OF CODE!
img

STEP 7: Let's change the default code to customize our collision event.

  • Click into the code editor inside the collision event.
  • Delete the line: ····sprite.go_to(0,0)¬
  • Now our sprite will stay where it is and the other sprite will "hide" so it looks like our sprite picked it up!

stage.set_background("winter") sprite = codesters.Sprite("snowman") sprite.set_size(.5) sprite.pen_down() sprite.glide_to(5, -6) def collision(sprite, hit_sprite): sprite.go_to(0,0) hit_sprite.hide() # add any other actions... sprite.event_collision(collision)
Support