You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behavior tree is a Godot node that can be added to your *Scene* tree. The logic inside tree nodes will be run every frame, during *process* or *physics process*, depending on tree process mode.
10
+
11
+
At each frame, the `tick` function of tree nodes will be run. This function has access to the *actor* (the node the tree is describing behavior for), and a *blackboard* (allowing to share data between nodes). The tick function can either returns:
12
+
-*SUCCESS*, indicating that node execution is successful,
13
+
-*RUNNING*, indicating that node is doing a long computation/action/whatever you want, that is not finished yet,
14
+
-*FAILURE*, indicating that something went wrong during child execution (condition not met, ...).
15
+
16
+
Depending on your tree structure, node result will produce various behaviors. See node documentation for mor details.
17
+
7
18
## 📄 Features
8
19
9
20
➡️ This plugin is an implementation of well-known Behavior Trees, allowing game developers to create AI-Like behaviors for their NPCs. In addition to provide all behavior tree base nodes, this plugin also brings additional helper nodes that avoid to create custom ones.
@@ -184,4 +195,52 @@ The blackboard delete action node is a *leaf* node. It allows to erase a key fro
184
195
🔑 Properties list:
185
196
-`blackboard_key`: name of the key that must be erased from blackboard.
186
197
187
-
⚠️ Due to GDScript 2.0 restrictions, only string type keys can be set, since its not possible to export Variant variables.
198
+
⚠️ Due to GDScript 2.0 restrictions, only string type keys can be set, since its not possible to export Variant variables.
199
+
200
+
## 📄 Creating your own nodes
201
+
202
+
Even if the provided node set is wonderful and all (😁), you will need to create your own nodes to describe your own behavior, your functional actions and conditions, or whatever you want.
203
+
204
+
*Creating your own composite and decorator nodes is off-topic here, and should be reserved for advanced users.* But creating your own actions and conditions is required, and is quite simple.
205
+
206
+
Empty-shell nodes **BTAction** and **BTCondition** are your entry-points. You just need to create a GDScript that extends one of this node, depending on what you want to do, and overrick the `tick` function, then code your functional stuff in it !
0 commit comments