Hi everyone, I’m new to making video games and have a few questions that hopefully you guys can answer. I’m trying to make a horror survival game and so far I have an AI that doesn’t move (yet, I want it to move is a special way) but he does rotate to stay looking at the player. I want to make it so that if the player looks at the AI for to long then the AI will rush the player and kill them. I have a variable that is set if the player has the AI in their field of view or not and it works I just can’t seem to find a way to incorporate it into the behavior tree in a way that lets me achieve my goals.
I was trying to use timers but I couldn’t find a way to clear the timer if the player looked away before the minimum time. Any help you can give will be much appreciated!