Use a BASIC function as a visual node
BASIC IN YOUR GAME
A designer can use a fare calculation in an action list without retyping its formula. The BASIC record owns the calculation. The visual action supplies the two numbers.
Functions as Nodes in the BASIC Designer. Fare is the callable name. Ticket Fare is its display label.
01. Open ticket_price from page 17, then Functions as Nodes. Enable Expose as Action and Visual Node. Set Function Name to Fare and Display Name to Ticket Fare.
02. Define two integer parameters in function order, count and rate. The pictured defaults are 1 and 2. Select Use Definitions to accept the form, then apply and save the script record.
03. Add Call Script Function to an action list or visual graph. Choose Ticket Fare. Supply count 3 and rate 4. Select a result variable if the next action needs the answer.
What you should see The action returned 12 and stored 12 in the selected game variable. A renamed function or reordered parameter list also needs an updated node definition.
