[Custom Condition] Baz Save Load Detected Condition

BazSaveLoadDetectedCondition

A maker friendly condition that turns true right after the game saves or loads. Good for a “Saved!” popup, an autosave flash, or setup that should run the moment a load finishes. Pick Save or Load from one dropdown and you’re set.

To help support my work, consider becoming a patron. :folded_hands:

DOWNLOAD:
BazSaveLoadDetectedCondition.gd (9.0 KB)

Requirements

AGMaker 1.3.0+

Installation

  1. Download BazSaveLoadDetectedCondition.gd (attached below).
  2. Drop it into your project’s custom_conditions/ folder. If that folder doesn’t exist yet, create it at the project root. A subfolder like custom_conditions/save_load/ is fine.
  3. That’s it. It’ll show up in the Add Condition dialog under the Save Data / セーブデータ group. Nothing to enable.

What it does

Gives you a transition condition that fires right after a save or load completes. There’s no built in check for that otherwise.

  • Detect Type. Choose what to watch for. Save turns true right after a save completes and Load turns true right after a load completes.
  • Trigger Window. How long in seconds the condition stays true once it fires. The default 0.05s is a brief pulse. For a Load, the window starts the moment your object first checks after loading, so it still gets caught even when the object spawns back in a beat later.
  • Trigger Delay (Load only). An optional wait before a Load fires. Left at 0 it fires the moment the scene loads, which is perfect for logic only work like setting a switch or refreshing a HUD. But a load keeps animation and movement frozen through the fade, so if the state you’re gating plays a visible animation, set this to about your loading transition length, often 0.3s to 0.5s, and it plays clean instead of blipping mid fade. Save has no transition to wait on, so this field only shows when Detect Type is Load.
  • Works on any object. The save and load event is global, so any object’s transition can react to it no matter who triggered the save.
  • Self contained and shareable. One file, no autoload, no Project Settings, nothing extra to manage. It spawns and cleans up everything it needs at runtime.

How to use

Add the condition to a transition on any object, then point Detect Type at Save or Load. Leave Trigger Window at the default unless an event slips through, then nudge it up. On a Load, if the gated state plays an animation, set Trigger Delay to your transition length so it fires once the scene is fully in.

Example, a “Saved!” popup: SaveGameData action → a transition with this condition set to Save → a state that shows your “Saved!” text and then transitions back.

Example, setup right after a load: gate a setup state behind this condition set to Load and run your one time work there, like repositioning the camera, refreshing a HUD, or playing a sound.

Example, a clean animation on load: gate an animated state behind this condition set to Load, set Trigger Delay to your fade length, and the animation plays in full once the scene is visible instead of starting mid fade.

Tips

  • Use Trigger Delay for animations on Load. A load freezes animation and movement until the fade finishes, so a state that starts an animation right away can blip. Set Trigger Delay to about your transition length, often 0.3s to 0.5s, and it fires once the scene is fully visible. Leave it at 0 for logic only reactions.
  • Nudge Trigger Window up if an event slips through. The 0.05s default is caught reliably on both Save and Load, but a bigger window like 0.1s to 0.2s adds margin if you ever miss one.
  • It’s a pulse, not a flag. Pair it with a follow up transition that leaves the state once your popup or setup is done, since the condition only stays true for that brief window.
  • One condition covers both events. No need for separate Save and Load plugins, just switch the Detect Type.
3 Likes

wowwww
I think this is a really useful feature. It can be used to create a lot of portable effects. Thanks, baz!!