Hi, i’m trying to code my basic AI behavior tree, i found a good epic youtube tutorial for behavior tree and so far i got my enemy to patrol, investigate follow player, attack player and die from the behavior tree.
Now i want to add hit animations for my enemies, i tried to use a selector checking if the blackboard key GetHit is Set it will run the hit animation and if it is not ser runs the normal sequences, i think the problem is that when the Get hit is changed to false the Behavior tree is taking the false as the variable was set and the animation is played when the enemy is not getting hit.
How can i validate this?, because i was thinking the blackboard condition ‘Is Set’ was for true and ‘Is not Set’ and for the action in game this is not right.
Can we see the inside of that custom task? SkeletonHit_BTT?
Also your Selector with GetHit=false is still going to trigger the Sequence with SkeletonHit_BTT after the Selector that has no variables on it because it runs left to right. You need to attach that Sequence to the spot above the picture, and give it a decorator that checks if GetHit is Set.