Save Across Levels

2812
2813
7
8

This example demonstrates using Global blocks to persist values when switching levels or restarting the game.

The Coins are stored in a Global block, so they are kept between levels. They are reset back to 0 when the game restarts.

Health is also stored in a Global block, and reset to its max value when the game starts.

Editor