Behavior Tree Tutorial

OwnerActor is the actor owning the BehaviorTree component. In regular use cases it’s the AIController, and yeah, some amount of casting is required to get what you really need.
That’s why, as a side project, I’m currently adding a way to have “specialized” AI events for BP-implemented BT nodes. User will get an option to create a “Event Receive AI Tick” or “Event Receive AI Execute” which, if implemented, will get called instead of the basic versions, and will supply AIController and AI Pawn directly as pins.
Will be in master branch today, in binary version, well, in 4.7 (oh the joys of software development!)

Cheers,
–mieszko

thanks for sharing.

I have been trying to get my head around behaviour trees, I don’t see it as a huge benefit over just having lots of custom nodes/functions within a master AI blueprint that you inherit all other blueprints from.

I am trying to control multiple AI’s that have their own pawns but all share the same behaviour to do the same thing, I am finding something as simple as, onbeginoverlap events hard to figure out when it comes to casting… :\

Found out that this actually is enforced. If a Sequence or Selector has no tasks branching off it, that element seems to always make the character move towards the player spawnpoint of the level. Same if the task’s event graph is empty or only contains events that aren’t called by the behavior tree upon starting the task. To actually implement idling (which I did manually because I couldn’t seem to find a pre-defined Idle task), you need to make the character move to its current position (thus effectively staying where it is). That at least seems to be true as of 4.15.3 (using it because the project started out in 4.15 and I didn’t want to risk anything compatibility-wise).