Download

Behaviour Tree Task-to-Task Communication

So I want to use the built in behavior tree support to form the control structure of my NPC.

Say, for example, I have a selector node with two tasks as its children (see image attached). The first task does a sphere cast
around the character and gets an array of all surrounding actors. In the second task, I now want to access this array of actors that
my first task found. How can I go about doing this?

I guess you could save it in the AI Controller. Because this one is accessable from all Tasks.
But this is only a guess… Could you maybe use a Blackboardkey for this, or aren’t there Keys for Arrays? :X

Blackboardkeys unfortunately don’t support arrays to my knowledge :frowning: It just seems a bit clumsy to pass it all to the AIController. Is there no way I could have a reference to one task in another task?