-
Notifications
You must be signed in to change notification settings - Fork 19
Home
fian46 edited this page Sep 14, 2020
·
11 revisions
clone or download the addons folder and put it on your project, then activate the plugins in project settings
- it is just a behavior tree there is no magic here you need to learn the concept, search it on the internet.
- the addons work only with single script but you can combine multiple tree in one parent. for example you can separate animation tree from logic tree
- in any node add BTREE node as it children. that node must have a script ! or the plugins will error.
- select BTREE node and switch to tree editor window
- you also need a node to connect to the root or it will not running
- to create a task / leaf node, you need to make a function with name start with "task_*()". for example to scan input the function name can be something like "task_capture_input(task)" the function also need to accept one argument. this argument is flow control
- the "task" argument for every task you can call succeed() to complete success or failed() to complete failed. if you not called anything then the task status is running. that means in the next tick it will called again until you call succeed() or failed()
- You can also passing argument to the task from the tree editor. this is useful when creating some kind of dialogue system for NPC or to play some animation.
- You can look up the rest of the node behavior by hover your mouse. there is tool tip you can use. also there is help button to explain some basic control like copy node, delete node and saving stuff.
- You can visualize current running btree instance in your game by click debug button, but your game must running first or debugger will not show anything.
- Currently you only can see the status but if you need any fancy thing, please create an issue.
- Debbuger
- debugger will not work with mobile currently, only local machine is supported
- you can pause a btree during debugging by pressing pause
- you can step a btree during pause by pressing and hold step button