I’m learning how to make AI enemies but I can’t figure this out:
I want to make an NPC that just repeats an idle animation until it has perceived that the player character has perceived it. I want this NPC to not move on from this task until it perceives you perceiving it, like the Witch from L4D. When you look away, the health variable is going to slowly regenerate.
I’ve got a trace coming from the FPS camera of the player character that’s working on other objects, I’ve attached a copy of that BP. Every trace that goes from the player character is going to reduce the health variable in the NPC, and when it reaches zero I want it to go to the next stage of the behavior tree. I could probably put this in the NPC blueprint but I think it’d probably be best to do it in the Behavior Tree; this also doesn’t take into account the NPC’s perception.