SAVE
Nodes for managing persistent data in Range Game Engine. Data is stored in Range.logic.globalDict (memory) and can be persisted to disk via Save Game / Load Game.
Nodes
| Node | Type | Description |
|---|---|---|
| Set Save Data | Action | Write a value to globalDict under a key |
| Get Save Data | Data | Read a value from globalDict by key |
| Has Save Data | Action (branch) | Check whether a key exists in globalDict |
| Delete Save Data | Action | Remove a key from globalDict |
| Save Game | Action (branch) | Persist globalDict to a file on disk |
| Load Game | Action (branch) | Load a save file into globalDict |
| Save Exists | Action (branch) | Check whether a save file exists |
| Property To Save | Action | Copy a BGE property into globalDict |
| Property From Save | Action | Copy a globalDict value into a BGE property |
| Clear Save Data | Action | Erase all contents of globalDict |
Typical save flow
[On Key Press: Key=F5, Mode=PRESSED]
→ [Property To Save: Property=health, Save Key="health"]
→ [Property To Save: Property=score, Save Key="score"]
→ [Save Game: Filename="savegame", Slot=0]
└── Saved ──► [Set Text: Text="Saved!"]
└── Error ──► [Set Text: Text="Save failed"]
Notes
globalDictis shared by all objects in the session — it acts as global memory.- Calling
Save Gamewrites the entire contents ofglobalDictto disk. - Calling
Load Gamereplaces the currentglobalDictcontents with those from the file.