Documentation

Learn how to use FlowCanvas

Using Variables

Blackboard Variables

As stated earlier, the easiest way to make use, meaning getting or setting a made Blackboard variable, is to simply drag & drop that variable from the Blackboard and into the canvas.

DragDropVariable

Get Value

Selecting to get a blackboard variable, will create a variable node, linked to that blackboard variable. The“$” token is always used before a name, to indicate that it is a linked blackboard variable name. In this example “$myInteger”. The single Value output port of the node, will return the value of that linked variable.

VariableBBNode

Set Value

Selecting to set a blackboard variable on the other hand will create a different type of node as seen bellow. A callable node. As such, the value will only be set when the node is called with a Flow signal and by default will be set to be equal to the value input parameter connected.

VariableNodeBBSet

In the node inspector of the node above, you are also able to specify an operation to be used when setting the variable. Instead of simply setting the variable to be equal to the value parameter, you can choose to add, subtract, multiply, or divide the value parameter instead. This can potentially save a bunch of nodes required to do the same thing, and keep the graph cleaner.

VariableBBSetOperation

Constant Graph Variables

You don’t always have to use Blackboard Variables though. In some cases you may simply want a constant variable used in some place and nowhere else. In these cases, it’s best to simply create a Graph Variable node as illustrated below and set its value directly through the node inspector.

Another, probably much simpler way though, is to simply drag and drop an input from a node into the empty canvas and select the option “Make Constant Variable”!

MakeGraphVariable

Later on, if you change your mind and want to link this to a Blackboard Variable instead, you can simply do so through the inspector by clicking on the radio button!

VariableNode

Yes No Suggest edit
14 of 14 users found this section helpful
Suggest Edit