Behavior Tree Editor

You can open the Behavior Tree Editor by going to RAIN → Behavior Tree → Behavior Tree Editor.

General Layout

The left hand of the Behavior Tree Editor is where you create, delete, and reorganize your tree. You can also right click on any node for some additional options.

The right hand side is an inspector for any properties the currently selected node may have. There is also a Reload button that can be used to reset/refresh the Behavior Tree Editor, and a drop down menu for the selection and creation of behavior trees.

Context Menus

The context menu may change depending on what node is right clicked on, so not all of these options will be available all the time.

  • Create - Only available for Containers. This allows you to add Actions and additional Containers to the selected Container.
  • Delete - This deletes the selected node and any children.
  • Cut - Cuts the selected selected node (copies then deletes the node).
  • Copy - Copies the selected node.
  • Paste - Pastes the node that was previously cut or copied.
  • Create Reference - Makes a link to the node so that it can be used in multiple places throughout the tree. Helpful in cases where large branches need to be reused.
  • Set Debug On All Children - Sets Debug to true on the selected node and all of its children.
  • Clear Debug On All Children - Sets Debug to false on the selected node and all of its children.
  • Open Action Script - Only available for Custom Action. Opens the script associated with the custom action.
  • Generate Action Script - Only available for Custom Action. Generates a script file for use with a custom action, in either C Sharp, JavaScript, or Boo.
  • Generate Missing Action Scripts - Only available for Behavior Tree Root. Generates a script file for use with all custom actions in the tree, in either C Sharp, JavaScript, or Boo.

Nodes

There are two main types of nodes: Containers and Actions

Containers such as Sequencers and Selectors, are used to define how the AI chooses between a set of possible options and to describe how to execute a sequence of tasks that work together.

Actions are used to deliver instructions to the AI to execute game logic or trigger an event in the game world. This can be anything from playing a sound effect, starting an animation, moving, or just executing some custom code.

Containers

Actions

behavior/behaviortrees/behaviortreeeditor.txt · Last modified: 2023/01/22 11:14 (external edit)