Skip to reading
BASIC Scripting

Save a flag with a game slot

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
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#

Code example
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#

Code example
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.

Source table from Save a flag with a game slot, page 30
Before savingThe shared Boolean signal_seen from page 8 was TRUE.
After savingThe running game changed signal_seen to FALSE.
After loading slot 3The 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.

Page 30 of 86Permalink
Go to page