Issue:
Behavior Graph logic for chasing two targets is not working.
Detailed Description:
I am working on a game where there are two players, and monsters are advancing. Monsters start chasing/attacking a player if they detect a player. When there is only one player, the target logic worked fine, but I tried making a graph that handles detecting 2 targets and it is not working.
Note: I couldn’t add a picture of the branch that checks if targets are detected and sets the Player1Detected and Player2Detected booleans because of the this sites’ restrictions, but it doesn’t seem like the error is coming from there and was working fine for the previous behavior with just one target.
My idea:
It first tries to see if targets are detected, then it goes into a branch that checks:
If both targets detected then pick a random target to chase/attack.
else if target1 detected but not target2 chase/attack target1
else if target2 detcted but not target1 chase/attack target2
Not working: For some reason, when launching the debugger, it doesn’t seem to indicate that it is ever entering the first branch (both targets detected). So even if on the game it says players are being detected, the monster doesn’t move and stays stuck.
Does anyone know why the behavior graph is blocking in this logic? This is my first time using Unity so I’m struggling to understand the logic.
