Use the event context in a small script
extends "res://scripts/runtime/script_base.gd"func run(event_context: Dictionary = {}) -> Variant:
var slot_number: int = int(
event_context.get("saveSlot", -1))
if slot_number < 0:
return false
var caption: String = "Slot " + str(slot_number)
if bool(event_context.get("saveExists", false)):
caption += ": " + str(event_context.get("saveName", ""))
else:
caption += ": empty"
await SetVariable({
"name": "save_feedback", "value": caption
})
return true1. Create a GDScript record with this source and apply it.
2. Select the Save Game Widget, open Events and assign the record to Click using the script-running behavior.
3. Keep the built-in Click slot action at select while testing.
4. Show $$save_feedback in a separate Label.
5. Click several rows. The Label should describe each clicked slot without performing a save.
The context belongs to this input. If the subsequent built-in action creates a save, this script has already run. Use a later explicit file query when you need the state after completion.
