39. Fill in definitions and use them
Figure 26. Choose the entry, then declare amount as an int with a default value of five.
| Control | What to enter |
|---|---|
| Function Name | award: a valid identifier, unique within this script. |
| Display Name | Award Workshop Points: the friendly name in pickers and a selected function-call node. |
| Description | A short statement of what the function changes or returns. |
| Entry node | The first action of this visual function. |
| Parameter | amount, type int, default 5. |
| Expose as Action and Visual Node | Checked if authors should be able to choose it. |
Use Definitions accepts the valid definitions and closes the window. It does not run the function and does not place a node on the canvas. In the Visual Script editor the definitions are written to the script record through the normal edit signal; save the project afterward.
Figure 27. Accept the edited definitions.
If the window stays open, read its validation message and scroll as needed. A missing visual entry, duplicate/invalid function name, repeated parameter name or wrongly typed default prevents acceptance. A text-script editor may also require its own Apply Changes step.
