OnSaveLoaded
On this page
Earlier edition reference / Current 0.86.4.0 property paths > p. 350
func on_save_loaded(event: Dictionary = {}) -> void:
Log(ToJSON(event))A save has successfully restored game state.
| Common context | Use and limits |
|---|---|
| slot, sceneId, playerId | Refresh presentation from restored variables. Do not award a pickup again merely because its saved state was loaded. This is a successful-load hook; a missing or invalid save should not be treated as a completed restore. |
OnCustomEvent#
func on_custom_event(event: Dictionary = {}) -> void:
Log(ToJSON(event))A script or Emit Event graph node explicitly emits this event name.
| Common context | Use and limits |
|---|---|
| Whatever keys the emitter sends; eventName is added for the listener | Use a reason key, such as signal_powered, to distinguish several messages sharing OnCustomEvent. It is not automatically emitted by every button or variable edit. The graph form uses its Context JSON; the GDScript helper merges its current caller context before emitting. |
OnGlobalReady#
func on_global_ready(event: Dictionary = {}) -> void:
Log(ToJSON(event))A persistent/global script is initialized through its language runtime's ready route.
| Common context | Use and limits |
|---|---|
| Language-specific startup context; native GDScript includes eventName and scriptId | Use it to initialize that global instance, not to assume a playable room is ready. The GDScript runtime calls a global script's matching method directly. The visual On Event picker does not offer this ready event; do not design it as a universal room-ready graph broadcast. |
