Skip to reading
Save Games & Inventory

Use a deliberate picture for the next save

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Set Save Slot Image is a shared action for an authored save picture. It chooses an image asset for the save-capture path. This is useful for chapter artwork, a portrait-style save menu or a room where a live capture is unhelpful.

Code example
extends "res://scripts/runtime/script_base.gd"
Code example
func run(_context: Dictionary = {}) -> Variant:
    await SetSaveSlotImage({"assetId": "map_art"})
    await SaveGameSlot({
        "slot": 4,
        "saveName": "The map room"
    })
    await SetSaveSlotImage({"assetId": ""})
    return true

This complete example sets the picture, saves to fixed slot 4, then clears the override so later saves can use normal capture again. Replace map_art with your imported image asset ID.

This is different from the widget’s screenshot background override. Set Save Slot Image supplies the picture stored for a save. The widget’s Background Image controls how that menu displays its picture region.

Save Game Slot writes directly to its fixed destination. This example deliberately uses that behavior; it does not ask for a name or an overwrite confirmation. Use a widget command instead when you want the player’s usual save-dialog flow.

Page 53 of 96Permalink
Go to page