Skip to reading
GDScript Programming & Godot

Gameplay: Saving, language and project settings

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
On this page

Runtime settings and save files are different kinds of persistence. Test saves with a fresh game, and use the same slot numbering consistently in scripts and custom save widgets.

SaveGame()#

Save Game

Save through the basic runtime route. With no structured slot supplied, this route uses slot 0.

No options in the standard catalog schema.

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await SaveGame({})

In use. Use it only when a deliberate quick-save slot is wanted. The normal catalog form has no fields. Choose Save Game Slot when the player or script must select a slot and a name.

LoadGame()#

Load Game

Load through the basic runtime route, defaulting to slot 0.

No options in the standard catalog schema.

Timing. Awaits loading.

Code example
await LoadGame({})

In use. Use Load Game Slot for an explicit slot or a custom load screen. Loading replaces important live state; keep later actions in the old sequence to a minimum and test missing-file behavior.

Page 218 of 378Permalink
Go to page