Step 8: Game Reset

Goal:


It’s time for the final part of the code inside of the Iron Man Sprite.

This will allow the game to start correctly from the beginning and stop the Y variable from always showing its value on the game screen.

Steps:

  1. Still on the Iron Man sprite, From Events, place two When green flag clicked blocks to empty spaces.
  2. Also from Events, place a broadcast reset_game block under one of the green flag blocks.
  3. From Variables, add a hide variable highscore block under the other green flag block.
  4. The Iron Man sprite code is now complete!

Code: