How to you kill an enemy AI’s behavior tree? I mean I want all activity to stop just as if I destroyed the actor. No matter what I do I still see activity the behavior tree. I don’t want the actor destroyed because I want it left in the scene. I have tried these things:
Unposessing the enemy from the AI
I have tried Stop Logic on the AI controller
I have tried destroying the AI controller
All of these in combination.
I have also tried placing a decorator at the beginning of the tree, although I’m not sure I’m doing it right. Besides, the tree is still being accessed and is probably affecting performance. Why can’t a behavior tree simply be killed once it’s started? I mean when an enemy dies, it should be lights out, no brain activity.
I’ve also tied running a behavior tree with a blank asset. The simulator will not stop. Perhaps I’m asking too much. I want the simulator to turn grey as if I destroyed the actor. I can say that the logic does stop running in that there is no more movement between behaviors. It’s just still sending a signal to the last behavior it stopped on. I’m just concerned that because the simulator is still sending a signal that it is still logic processing and will have an impact on performance. If this is natural behavior of the simulator then I will stop trying to kill this cockroach.
Take a look at the sample Action RPG, where you find an example of those nodes. This is used if you want your player to be possessed by the AI Controller (Auto Battle mode) and possessed back to your player controller.