AI advanced functionality question

Hi there,

I’ve yet to dive into the AI with any real vigour. I had a basic wandering AI on a prototype I was working on a few months ago, but in my latest project my need is for this one AI to do more advanced behaviours.

For example, I want this AI to effectively be blind so he will do no LoS checks - or rather none that represent sight. The idea is that he uses smell and sound to locate you and I’m wondering at the best way to do this using a combination of blueprints and behaviour trees?

I thought for the ‘smell’ system, this would be a distance/time based system with several ‘alert’ states. In conjunction with this, I want the player to drop behind ‘scents’ (invisible entities with a decay timer on them) which the creature can detect if he gets close enough to them in a certain time frame. From there he would theoretically be able to follow a scent once he picks it up, should the time not have run out for the scent to still be around, at which point he would lower his alert state and go back to whatever he was doing before the scent was picked up.
For the sound events, he should check for audio events created by the player and other dynamic sources to further pinpoint the location of enemies. This would allow his two ‘senses’ to work together to pinpoint potential enemies, and also allow the player to effectively lose the AI pursuer by running through liquids to disguise scent, jump over gaps in geometry to throw the scent off and sneak around or cause physicalised objects to make noise to confuse the AI.

Does any of this sound problematic, and can anyone lay some basic framework for this to get me started please? I’m not an advanced user of UE4 by a long shot in terms of scripting etc but with some guidance I pick things up pretty quickly and usually end up moulding something good from a solid starting point!

Thanks for any help on any of the systems mentioned here. If you have a good idea how to do any of these things (in particular the smell system) then reply on here.


Daz. :slight_smile:

This sounds like a collision-type issue, where the bounds of it would be in a fairly good-sized elliptical collision that detects overlaps of the scents actors. It would register the scents and path to that location. Detecting a new overlap of another scents would override the previous detection, unless it can detect the decay time as well. If it does the decay detection, it could prioritize to the freshest version, thus leading closer to the source of the scents.

You would also want to surround the player with the same scents that has the lowest number of decay, therefore attracting the creature before a scents trail would.

I believe the system does an audio-tracking as well, I have not delved too deep into the AI portions yet. I think they do have aural hearing, though.