Skip to content

Restore the scene after a load

After a saved game loads, a scheme that was running puts your scene right again: a door opens, a banner flies, a line welcomes the player back.

  1. In the scheme, add an On Game Loaded node. It has no input and one output, Loaded.
  2. Link Loaded to what must happen after the load.
  3. To put scene objects right, link a Send Signal node and choose the same Signal asset the scheme sent when the change first happened. A Signal Receiver reacts to it again.
  4. To tell the player, link a Show Announcement.

The demo’s Tutorial scheme uses an announcement. Its On Game Loaded node leads to a Show Announcement titled Welcome back, shown only if a player plays the Conspirator.

A save keeps the story: running schemes, their flows and variables. It does not keep what a Signal Receiver did to the scene.

Reactions are not saved, so the objects are as the scene made them.

After the load, every On Game Loaded node of a scheme that was running starts a flow once the scheme’s restored flows are going again, and a scheme that has more than one such node starts all of them.

  • The node never runs. It runs only for schemes that were running when the game was saved. It never runs when a scheme starts.
  • A scheme ends after the load. A scheme with no flow to restore and no On Game Loaded node ends after the load instead of staying alive.
  • The flow cannot see other actors’ schemes. With Restore Order on Per Actor, an On Game Loaded flow of one actor can see other actors whose schemes are not back yet. After All Actors restores every run first, then runs every On Game Loaded node. The setting is on the Save System. A plain load from a file restores per actor whatever this setting says.
  • Chances differ after a load. What the dice do after a load is the Dice After Load setting, New rolls at first.
  • From code. Listen to IntrigueSaveSystem.onLoad for a load that is not tied to one scheme.