TentworksInteractive
New member
Hi,
We would like to change the external behavior tree at run time. Like to know how and which way is efficient. Our game is like a city full of AI[say more than 200], we have AI pool and behavior pool. We get AI from the pool, add initial data, add/change behavior/external tree from the pool then activating the AI in the game.
We have a base tree for all Guest AI's "GuestBaseBehaviorTree", which has an external behavior tree reference task called "CurrentBehavior". Initially, we thought, we can directly change this at runtime[Marked in green], but after going through a couple of threads in the forum,
Forum thread:
https://opsive.com/forum/index.php?...havior-at-runtime-not-working.1597/#post-7716
and as well as in discord. It seems like we need to start a fresh tree for every different functionality/behavior tree we want to change in the runtime.
Also, we bought and checked Movementpack and Formationpack demos too. It explains, disabling and enabling the behaviors at runtime. But we thought we could create a pool of external behavior trees and update it in behavior tree reference task in runtime.
Questions:
1. As you have mentioned in those threads, we need to make a copy of the entire set up, means, do we need to have different GuestBaseBehaviorTrees, such as "Wander[Marked in Red]",
"SearchForBusiness[Marked in Yellow],
So If we understood correctly, we basically need switching this entire set up at runtime and means, changing External behavior in the BehaviorTreeComponent at run time, right?
2. And is this the only way to switch behaviors or any other way around?
Thanks in advance,
Out of topic: Thanks for creating this awesome asset.
We would like to change the external behavior tree at run time. Like to know how and which way is efficient. Our game is like a city full of AI[say more than 200], we have AI pool and behavior pool. We get AI from the pool, add initial data, add/change behavior/external tree from the pool then activating the AI in the game.
We have a base tree for all Guest AI's "GuestBaseBehaviorTree", which has an external behavior tree reference task called "CurrentBehavior". Initially, we thought, we can directly change this at runtime[Marked in green], but after going through a couple of threads in the forum,
Forum thread:
https://opsive.com/forum/index.php?...havior-at-runtime-not-working.1597/#post-7716
and as well as in discord. It seems like we need to start a fresh tree for every different functionality/behavior tree we want to change in the runtime.
Also, we bought and checked Movementpack and Formationpack demos too. It explains, disabling and enabling the behaviors at runtime. But we thought we could create a pool of external behavior trees and update it in behavior tree reference task in runtime.
Questions:
1. As you have mentioned in those threads, we need to make a copy of the entire set up, means, do we need to have different GuestBaseBehaviorTrees, such as "Wander[Marked in Red]",
"SearchForBusiness[Marked in Yellow],
So If we understood correctly, we basically need switching this entire set up at runtime and means, changing External behavior in the BehaviorTreeComponent at run time, right?
2. And is this the only way to switch behaviors or any other way around?
Thanks in advance,
Out of topic: Thanks for creating this awesome asset.
Last edited: