Skip to reading
Replace the Built-in Screens

10. Install the working script helpers

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

These helpers are project scripts. Create them in the GDScript Designer; do not paste them into the PCA engine’s source files. They use the reference build’s runtime GUI classes, so keep the element IDs consistent with the layouts.

1. Create the GUI records, element IDs and variables described in the preceding chapters.

2. Open the GDScript Designer and add a script record with the stated ID.

3. Replace its source with the complete example. For a multi-part listing, paste the parts into the same record in order, with only one extends line.

4. Enable the record. Turn on Global Script only where the instructions say to.

5. For journal_tools, also subscribe to OnPlayerChanged and OnSaveLoaded in Event Functions.

6. Apply Changes, run Validate and save the project.

7. On an ordinary GUI or story event, select Run Script/Run Visual Script and choose the small wrapper record that performs the intended operation.

Source table from 10. Install the working script helpers, page 68
Global controllerPurpose
menu_toolsParent routes for Save/Load, Continue availability, selected-slot guard.
options_toolsLoad, stage, apply and persist the custom settings controls.
journal_toolsKeep personal notes and display the selected entry in a read-only reader.

A Global Script stays available while the game runs. An ordinary wrapper runs when called. Checking an event subscription is separate from making a script global.

Page 68 of 88Permalink
Go to page