Download

Help with AI and Behavior tree: Taking damage falsifies other senses.

Hello, I hope the Title makes sense…

I’m trying to learn setting up AI in unreal. I’ve been following a tutorial and slighting expanding upon it in areas where I think I have the knowledge, but I’ve run into a bug and I can’t seem to find out why its happening. Currently the AI can perceive sight, hearing and damage. He follows a patrol until he sees the player. then he’ll chase and attack. if he hears a noise and doesn’t see you he’ll investigate, and if he takes damage and doesn’t see you he’ll investigate. The sight and hearing seem to work and interact with each other fine, but for some reason whenever he takes damage the other senses become untrue. this causes him to investigate the area where he got hit and then return to his patrol. during this investigation if I step in his line of sight he still doesn’t see me, but if I create a sound he will investigate that and if he sees me while doing that, then he chases like normal.

Currently damage is set at the dominant sense, though I originally had it as sight. regardless it doesn’t seem to have an effect so I think the issue is somewhere else but I can’t figure out why.