Skip to reading
Panels, Tabs & List Boxes

23. Use the same actions as visual nodes

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 34. The visual script uses the same List Box: Add Item operation as the Button’s action editor.

1. Create a visual script named Add Clue. Add the entry node for the interaction you intend to run.

2. Add a List Box: Add Item action node. Choose the same GUI and List Box targets used in Chapter 21.

3. Fill in clock_hand, A loose clock hand, the optional icon and Insert Index -1.

4. Connect the entry output to the action node. Apply or save the graph, then assign the visual script to the desired GUI Button or gameplay interaction.

5. Test once, then repeat the interaction to decide whether a one-time guard is required.

An action list is another place to arrange the same operation. Add Item can be followed by Set Variable or another story action. The fields do not change meaning just because the action is in a different editor.

For branching on a selected ID, compare the selection variable with the stable row ID. Use the available variable condition controls, or the complete GDScript example in Chapter 13 when you want the response logic written in one place.

Do not treat the List Box element’s general Click or Hover event as a guaranteed per-row selection event. The select-then-confirm pattern gives your script a clear selected-ID input.

Page 41 of 50Permalink
Go to page