Hey guys, I've been getting my feet wet with AI in unreal and i just have a conceptual question about how to structure the logic in the blackboard/behavior trees:
I'm trying to make some fixed waypoint patrol paths for a village guard and I want him to switch between a few paths throughout the day based on time. For example, he patrols path A between 3 fixed points in the morning, and then path B between 3 different points in the afternoon.
Should I setup different behavior trees for Path A/Path B and run each behavior tree independently from the Event Graph? Or do I just make different sequence paths inside one behavior tree for each path, and cast/change the stored variable to activate each sequence from the event graph?
asked Apr 11 '16 at 09:27 PM in Blueprint Scripting
Okay wow, I've had a lot of work with this now and I understand it better.
Do NOT try and run 8 separate sequence branches on one bhtree that each have ~5 branches of their own with services and tasks everywhere. Do that, and you're gonna have a bad time.
It's much better to split up those 8 into their own behavior trees and choose them with the player controller. Debugging is easier, bots don't randomly get hung up for what seems like no apparent reason, and you wont end up with bots following one task while having the blackboard key of another and other fun-ness.
answered Oct 23 '16 at 03:19 PM
Use a Behavior Tree Service to select the desired path in your AI Tree. This way it can react to other things (say a wild bear attack).
answered Apr 12 '16 at 01:31 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here