How to change Behavior Tree at runtime?

I am currently developing kind of city builder on c++. I am trying to recreate MC mod - MineColonies. I have an AI controlled characters with profession. Every profession needs to do different things. So I am wondering if there is a way to change given controller’s Behavior Tree at runtime. Or change the controller itself. If this is not possible may i ask for recommendations on for the realization of different “behaviors”

I have no idea how to do this with pure C++, but if you don’t mind using a Blueprint Implementable Event, I believe the Run Behavior Tree node will replace the behavior tree of a controller for you.

1 Like