STEP 10: Time to add an interval event, since we want to continuously generate sprites!

  • In GRAPHICS, go to and drag Interval Event indented and inside play_game().
  • Delete this line of code: sprite.turn_left(15)¬
  • Then, in LOGIC, click on and drag Random Integer inside the interval event.
  • Change my_var to x, and change the function to generate a random number between -200 and 200.

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)