-
Notifications
You must be signed in to change notification settings - Fork 7
Nodes
A core concept of LUTE is Nodes and how these interact with one another and the Flow Engine.
Each Node can contain one or more Orders which essentially drive your experience in a step by step fashion.
Inpsecting a node is simple:
- Create your Flow Engine object and open/dock the window.
- Select the default node or any node that you have added to your Flow Engine. The Node's properties are visible in the inspector view:

You can see many properties on the node including the name and description of the selected node. The currently selected node (s) are highlighted in green.
We find it important to name our nodes in a unique fashion to ensure there is no confusion between multiple nodes. We also find adding a short description of the node helps other designers understand what this specific node will do when executed. Changing such paramters is easy:
- Select the chosen node you wish to change
- In the inspector window for the node, update the name and description
- Observe changes in the Flow Engine window

N.B: Node names are shown in drop downs for selecting in various other parts of LUTE, as such you may wish to name them using categories. Placing a '/' in a node name will result in dropdowns collecting things into categories.
Creating new nodes is easy using the Flow Engine Window:
- Ensure you have created a Flow Engine and the Window is open
- You can either select the 'Add New Node' button in the top left of the window (the '+' sign) or right click anywhere and select 'Add New Node'

- A new node has been added to the window with a default name and empty order list
Add a useful name and description now before you forget!
When right-clicking on a node a context menu pops up with multiple choices related to that node.

Nodes can be copied or cut (typical behaviours you find in other software such as word processors) and then can be pasted at another point (removing the original if cut was chosen). Multiple nodes can be selected by using the drag rect (hold down left click anywhere on the window and begin dragging to select multiple nodes).

To duplicate (clone / make an exact copy of) a Node, without using copy/cut then:
- Right-mouse-click over the Node you wish to duplicate, and choose
menu>Duplicate

- A copy of the Node should now have been added to the Engine (with "(copy)" appended the name of the duplicate):
Remember to add a unique name and descriptor as soon as possible.
To delete a Block from the current Engine:
- Right-mouse-click over the Node you wish to delete, and choose
menu>Delete

- The Node should now have been removed from the Engine and Window
If you ever accidently delete a node or cut it or somehow it becomes lost then you can try the shortcut CTRL (or CMD) + 'Z' to undo your last action!
For information on the blueprint context item pleae head to Blueprints.
LUTE currently offers three types of visuals for nodes depending on their behaviour:
- Event Nodes which are typically rectangular and cyan
- Choice Nodes which are typically hexagonal and blue
- Normal Nodes which are typically rectangular and orange

For more information on Node Types please read on:
Typically in Unity we execute code blocks through conditions or using Unity provided methods such as Start and Update. In LUTE, Nodes can be executed in similar ways but often start executing if the Node has a defined Execute On Event. If a Node has any possible Event attaced to it (common examples include Game Started and Update) then then Node will be displayed as a cyan rectangle (unless a custom tint is being used).

In this example, we have creaeted a Node and selected the 'Game Started' to activate the node so any behaviour on this Node will begin as soon as the game has started (or the Editor has entered 'Play Mode'). Displaying an Event Node always overrides any other display types except for when using custom tints.
Note: Event Nodes also show some text in triangle braces below the Node itself which describes the type of event this Node has. You can switch this visual off using the Show Handler Info on Graph toggle on the Flow Engine object in your scene where the Node is related to.
If a Node is not an Event Node but contains 2 or more orders which include the 'Next Node', 'Choice', 'Menu Choice' or any other order that may relate to calling or connecting other Nodes and the orders do not share the same target Nodes then the Engine will display the Node as a hexagon.

The Flow Engine Window will also draw arrows between the connected Nodes (if they have been provided). More on connections is detailed further below.
If a Node is neither an Event Node or Branching Node then it is a 'Normal' Node which is typically displayed as an orange rectangle (if no custom tint is being used). All Node visuals update automatically when you change their setting.

The Next Node Order tells LUTE to start execution of another Node. There are a few modes to decide upon when doing such an action:
- We can 'Stop' immediately which stops execution of the current Node and passes control to the target Node.
- We can 'Wait Until Finished' which will wait until all Orders on the target Node are completed before passing control back.
- We can 'Continue' which will execute the target Node while simultaneously execute the remaning orders on the current Node (this is rather complex so proceed with caution).
To pass control and call another Node we do the following:
- Select a Node which will be called at a certain point (in this case when the game starts)
- Add another Node which will have some functionality on it
[screen of the two nodes]
- Add the 'Next Node' order to the first Node by selecting
Flow>Next Node - With the new Order selected, choose the second created Node from the Target Node drop-down along with the mode type you desire:
[scren of selecting target node]
Keeping the Target Engine as default will use the Engine that this Node is attached to
- You should see an arrow in the Flow Engine Window connecting the two Nodes together. The arrow dictates which way the call is happening (in this case from the first created Node to the second created Node).
[screen of arrow]