Save a flag with a game slot
On this page
BASIC IN YOUR GAME
A flag that remembers the signal was seen belongs to the player’s progress. Save slots are useful when two playthroughs can reach different points in the story.
At the point where your game offers Save#
AWAIT SaveGameSlot({"slot": 3, "saveName": "Station"})This fragment goes inside the function that handles saving. The slot number identifies the destination. Saving again to that slot replaces the previous snapshot. Use the slot the player selected in a real save menu.
At the point where the player chooses Load#
AWAIT LoadGameSlot({"slot": 3})The load belongs to a separate user action. Loading immediately after saving would only bring back the state the player already sees.
| Before saving | The shared Boolean signal_seen from page 8 was TRUE. |
|---|---|
| After saving | The running game changed signal_seen to FALSE. |
| After loading slot 3 | The game restored the room and signal_seen read TRUE again. |
Use a GLOBAL or shared game variable for story flags. Use the file chapters for settings that should apply across multiple saved games.
