19. Room changes, restarts and saves
Designer variables belong to the current game state, rather than to the room in which they were first changed. If the player earns points in the workshop and walks into the hall, the same score is still available there.
Figure 23. The preview has moved to the adjoining hall. The scene geometry changes while the shared puzzle values remain available.
| Action | What happens to variables |
|---|---|
| Change to another room | The current runtime values continue with the game. |
| Stop, then start a fresh preview | A new runtime copies the authoring starting values. Startup actions can then change them. |
| Save Project | Saves designer definitions. It does not capture the current play session. |
| Save Game / a game slot action | Stores the current runtime variables with the saved game state. |
| Load Game / a game slot action | Restores the saved variables. It does not start each one again from its designer value. |
The hall shown here is only a test of shared state; you do not need to build another room to use Variable Designer. You can check the same behavior with any two connected scenes in your own project.
A variable folder does not alter these rules. Neither does the fact that the action changing it belongs to a particular character or object. To keep separate facts, create separate IDs.
