behavior-trees
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
behavior-trees [2020/05/22 12:36] – maxime | behavior-trees [2021/07/29 11:56] (current) – maxime | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Behavior Trees ====== | ====== Behavior Trees ====== | ||
- | You can find an example of behavior tree and behavior tree node creation in the '' | + | You can find an example of behavior tree and behavior tree node creation in the following mods: |
+ | * '' | ||
+ | * '' | ||
===== Register new behavior trees ===== | ===== Register new behavior trees ===== | ||
- | You can now create custom behavior tree assets with '' | + | You can now create custom behavior tree assets with '' |
A behavior tree is defined as a table containing an ID ('' | A behavior tree is defined as a table containing an ID ('' | ||
Line 11: | Line 13: | ||
==== VariableList ==== | ==== VariableList ==== | ||
- | Each variable in the list must contain at list a unique '' | + | Each variable in the list must contain at list a unique '' |
You can also specify if a variable is public ('' | You can also specify if a variable is public ('' | ||
Line 27: | Line 29: | ||
Leaf nodes ('' | Leaf nodes ('' | ||
- | When defining a node in a new behavior tree, you have to specify at least its unique name ('' | + | When defining a node in a new behavior tree, you have to specify at least its unique name ('' |
Finally, if the node is a branch node, you have to add the list of children ('' | Finally, if the node is a branch node, you have to add the list of children ('' | ||
Line 39: | Line 41: | ||
==== VariableList ==== | ==== VariableList ==== | ||
- | The list of variables is a simple key-value pair list with the variables name as key, and its type (inheriting from '' | + | The list of variables is a simple key-value pair list with the variables name as key, and its type (inheriting from '' |
==== Functions ==== | ==== Functions ==== | ||
- | A leaf node has three basic functions: '' | + | A leaf node has three basic functions: '' |
- | When a node is executed, the '' | + | === Init === |
+ | |||
+ | '' | ||
+ | |||
+ | ^ Name ^ Type ^ | ||
+ | | //'' | ||
+ | |||
+ | === Update === | ||
+ | |||
+ | '' | ||
+ | |||
+ | ^ Name ^ Type ^ | ||
+ | | //'' | ||
+ | | //'' | ||
+ | |||
+ | === Finish === | ||
+ | |||
+ | '' | ||
+ | |||
+ | ^ Name ^ Type ^ | ||
+ | | //'' | ||
+ | |||
+ | When a node is executed, the '' | ||
You can access all of the node's variables in those functions with '' | You can access all of the node's variables in those functions with '' |
behavior-trees.txt · Last modified: 2021/07/29 11:56 by maxime