Let's add litter to the stage as long as there is still time left on the timer.

  • Use if inside the event to test if the value of timer is greater than > 0.
  • In the if statement, add Random Choice. Name it litter_image. Make the parameter all_litter.
  • Drag Sprite at Position inside your event. Name it new_litter.
  • Change the image name to the variable litter_image. change the coordinates to x, y.

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)