Sharing Values Between Behaviors

Some behaviors can output values for you to use with other behaviors. When you tap on any behavior, you will notice some behaviors have a little circle with an output icon, meaning you can drag the output value into the input field of another behavior. For example, Add Values will output the sum of the two numbers that you have specified, and if you want to store it into a Box Container, then you simply tap on the Box Container behavior and drag the output into the Storage input field.

Multiple Output Values

Some behaviors have multiple output values. An example of this would be the Calculate Direction behavior. The Calculate Direction outputs an X Vector, Y Vector, and an angle.

Change Input Field

Pressing the icon inside of an input field will prompt you to make a Change Input Field behavior. This behavior is an action, and will change the value of the input field when executed by an event. Unlike a box container, the "Change Input Field" only controls a single input field, is an action, and can not output anything to other behaviors.

Keep in mind, the changed value will only be reflected when the original behavior is executed again, or the "Restart Behavior" toggle is on.

For example, if you are changing the velcoty of an object, the rate at which the object moves will not be affected until the original "Set Velocity"behavior is executed again.

The Change Input Field behavior that is created from the prompt.


By toggling "ON" the "Restart Behavior" switch in the "Chang eInput Field" behavior's properties, you can cause "Change Input Field" to execute the original behaviour. This will update the original behaviour with the new value.


Missing Behaviors

If a behavior is deleted, the input field that it was shared to will be highlighted red to indicate the error.



Article is closed for comments.