Skip to reading
First Light, Part 6: The Final Hour

Build the two slot screens

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 illustrations

02 / SAVE SLOTS

1. Make two GUIs. Create write_slot and read_slot. Give both the same called-by-trigger activation as the title. On each, add a background Panel at 150, 55, size 980 × 610, and a heading at 225, 75. Use “Save game” on one and “Load game” on the other. Add a Save Game Widget to each at 220, 156, size 840 × 355.

2. Set up the rows. Select the widget. In its Type Settings use 1 column, 3 rows, page size 3, slot width 714 and height 80. Choose First Manual Slot 1 and Last Manual Slot 0 to follow the project maximum. Keep the widget’s page arrows so players can reach the fourth manual slot. Show the slot number, name and scene. Place the thumbnail on the left.

Source table from Build the two slot screens, page 3
Widget fieldSave screenLoad screen
Element IDwrite_slot_rowsread_slot_rows
Widget Mode / Sort Savessave / slot-ascendingload / slot-ascending
Include Autosave / Show Empty SlotsOff / OnOn / Off
Left Click / other clicksselect / noneselect / none
Close GUI Afternoneload
Prompt for Save Name / Confirm OverwriteOff / OnNot used when loading

3. Give the empty list a voice. Set the load widget’s empty text to No saved games yet. Keep right-click and double-click actions set to none. A tap selects a row. The separate button on the next page performs the write or load.

Why two different widget IDs? A button sends its command to a widget by element ID. Distinct IDs keep “Save selected” connected to the correct list even though both screens look alike.

GUI Designer with write_slot_rows selected. The slot list is one widget. The confirmation and return buttons are separate elements.

Page 3 of 17Permalink
Go to page

Continue your 3D adventure

  1. Part 1First Light, Part 1: Your First 3D Adventure
  2. Part 2First Light, Part 2: Three Knocks
  3. Part 3First Light, Part 3: Behind the Wall
  4. Part 4First Light, Part 4: The Message in the Machine
  5. Part 5First Light, Part 5: The Clockmaker’s Secret
  6. Part 6First Light, Part 6: The Final Hour