magique
Active member
I've tried BD many times in the past, but I can never seem to get my head around how to get the correct logic flow. I recently tried NodeCanvas and had no problem creating the kind of logic I need, but when I try to replicate the same thing in BD, it doesn't function as expected. I'm attaching a simple Behavior Tree to control a Motion Controller NPC. The logic is that I increase the Hunger every tick using the Modify Attribute Float node. Under the Selector I have 2 Sequences. Each sequence starts by checking the Hunger attribute float. The first one compares to <= 39 and if true will perform Navigate To waypoint #1. The second sequence compares Hunger to >= 40 and if true will navigate to waypoint #2. However, what I see is that the first sequence kicks off and the NPC moves to waypoint 1, but once there, the Selector with both sequences never runs again. So even though the first sequence should fail when the Hunger gets to 40, it never runs that check again. I tried making the Selector into a Selector Evaluator instead, but the same thing happens. The entire right side of the Parallel node never lights up green once the first Sequence Navigate To is completed. If
I could just understand why this sort of tree doesn't operate as expected, I might be able to finally get a grasp on how BD works. Attached is my behavior tree.
I could just understand why this sort of tree doesn't operate as expected, I might be able to finally get a grasp on how BD works. Attached is my behavior tree.