Help on StealthAI

Moonwatch

New member
Hey all. I am a bit of a noob to the whole AI business and I just wanted a bit of direction. I am trying to make stealth ai, and I have a lot of it down. When unaware, it sits on a spot, until a player walks into its line of site, and is on the same height level as it is, where it will start to follow and attack. Unfortunately, I am getting stuck on how I make the thing go back to a patrol state after the player is out of its line of sight, but only after a short time, because it starts to interfere with other parts of the tree. Its turning my brain into laffy taffy, so I just wanted to ask some tips on how to structure this to allow for that.image_2023-05-21_095912054.png
 
Where is your patrol task? I should then have a better idea on how to restructure your tree.

Also, if you haven't seen it, I recommend taking a look at our character controller integration tree as it defaults back to the patrol branch. This tree is using a useful structure even if you don't have our character controller.

 
Where is your patrol task? I should then have a better idea on how to restructure your tree.

Also, if you haven't seen it, I recommend taking a look at our character controller integration tree as it defaults back to the patrol branch. This tree is using a useful structure even if you don't have our character controller.

Its the one on the very right. Its not patrolling, its standing as a sentry in one spot facing a specific direction. thanks for the link, it is very insightful.
 
Ah, ok.

Yeah the link should help a lot with how to structure your tree. At a high level you will want to use conditional aborts for each child branch and reevaluate the conditional task. You have a Lower Priority about on the far right branch but that's not going to reevaluate any tasks because there aren't any branches to the right of it.
 
Top