STEP 14: We'll want to track each time there is a collision so we can keep score.

Variables created OUTSIDE of an event or function can't be changed INSIDE an event or function. We can use the keyword global to make an exception to this rule. Global lets us use a variable inside and outside of an event.

  • Delete the .go_to() and .hide() commands that are inside the collision event.
  • Go to and drag Global Variable INSIDE the collision event. Change the variable to score.


# THIS ACTIVITY IS IN PREVIEW ONLY MODE