Skip to reading
Eight Adventure Interface Workshops

12. Small scripts for the missing details

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

Figure 46. Global Script keeps a small controller available during play.

1. Open the GDScript editor and add a Script record with the ID given for the example.

2. Replace the record’s source with the complete example. Keep the first extends line.

3. Enable the script. Turn on Global Script only for the examples marked Global.

4. Keep the IDs used in the example, or change the script and the GUI together.

5. Run Validate, then test in Play. A compiled script can still refer to an element that you did not create.

6. For ordinary event scripts, choose Run Script/Run Visual Script in the event action and select the record. That shared action can run a GDScript record as well as a visual graph.

These scripts target the reference build, 0.86.3.4. They use its runtime GUI classes where ordinary shared actions do not cover the detail. Keep a project copy before adapting them to a later engine build.

Page 96 of 119Permalink
Go to page