STEP 19: Go to and drag if or inside the collision event, but outside the other if statement.

  • Test if the variable image is equal to "car1" or "car2".
  • Use Set Text to set result_text to "YOU LOST!" inside the if statement
  • Use Set Color to change result_text to "red" inside the if statement.
  • Also inside the if statement, use Go To to return speedy to (0, -240).

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)