26. Preview, saving and restoring state
| Task | Use this |
|---|---|
| Move and resize controls | Designer editing, Preview off. |
| Try local list selection, scrolling or a dropdown | Designer Preview on. |
| Test a selected-ID variable or Review Button | Running game preview. |
| Check actual carried inventory | Running game with the intended player and item awards. |
| Keep GUI geometry and authored rows | Apply where required, then Save Project. |
| Keep a player’s changing journal | Store its source data in game state and test save/load. |
Designer Preview can let you select rows locally, but it does not write into the real game’s variables or run the Review Button’s gameplay event. A response that stays unchanged there is not evidence that the script failed.
Runtime list actions do not rewrite the project’s authored Manual Items table. Saving the project in the editor is different from saving a player’s game.
For a journal that must survive save/load, prefer a source Array or story variables as the record of discoveries. Rebuild any deliberately local view from that saved data when appropriate. Do not rely on a widget’s temporary source copy, selected highlight or current tab being a complete save-game record.
Test a real save/load sequence: discover a clue, choose an item, close the notebook, save, change state, load, then reopen it. Check both the underlying data and what the player sees. A restored selected-ID variable alone need not restore the widget highlight.
Start each basic test with empty selection variables. Add deliberate selection-restoration logic only after the list’s ordinary behavior is working.
