STEP 10: Let's make the coin appear, if the player has lives left and if the random number is greater than 50.

  • Go to and drag if inside the interval event.
  • Change the double equals sign == to a greater than sign >.
  • Change the test variable to rand_chance and the test value to 50.
  • Drag Sprite at Position inside the if statement. It should have ········ in front of it.

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)