19. Expose the functions to action lists
Open Functions as Nodes for the Adventure Controller. Add definitions for the three functions below. Their code is already in the script; the definitions tell PCA how to show them in visual editors.
| Function name | Friendly label | Parameters |
|---|---|---|
| send | Run Adventure Command | command: String; default look |
| presentation | Switch Adventure Presentation | None |
| dismiss_reply | Close Adventure Reply | None |
Figure 11. Function definitions provide the names and editable parameters used by action-list and visual-script calls.
Apply the definitions. In an action list, add Call Script Function, choose Run Adventure Command from Adventure Controller and enter a command such as read note.
“Use Definitions” applies the declared function list to the editor. It is not a Play button and does not execute the selected function. After applying, look for the function in a Call Script Function selector or the visual-node function tools.
A definition must point to an actual function with a compatible parameter list. Changing the friendly label does not rename the GDScript function. Keep send(command: String) as written.
