AI Mechanics?

Hello,
I have this AI that I would like to program to roam, flee from the player. (i.e herding mechanic), and randomly spawn on the map.

For the roaming, I would like to switch between a running, idle, and eating animation. I am thinking of blending the idle and eating animation. I watched a video on roaming ([EASY AI ROAMING][1]) but unfortunately it stopped working at one point(???) I have a nav mesh so I don’t understand what happened.

As for the flee mechanic, I would like the AI to react to sound and not distance. Also I noticed that the AI goes through objects when I implemented a fleeing mechanic from a video ([RUN AWAY CUBE][2]) I would like it if the AI does not fall off the map and just turns around.

And for the random spawn, I plan on having 9 AIs in total with 3 different variants and I would like to randomly spawn between the 3. Sometimes they’ll be 4 of one variant, 3 of another, and 2 of the last variant. It’ll randomly spawn between a certain range. I would also like it to spawn in a certain area without using target points as I want a whole area. I watched a video on random spawn location ([Enemy Spawn Volume][3]) which required a lot of coding.

If someone can give me some pointers (with images) on how to program my AI, that would be great!
Thanks!

P.S: The run away cube video is hilarious! He makes coding sound so fun and chill!

1.Here what you need for the animation idle walking run(ep 7) it’s quite simple: BP 3rd Person Game: Introduction | 01 | v4.8 Tutorial Series | Unreal Engine - YouTube
2.AI code only needs to be in AI Behaviour Tree(or at least talking with it) anything else is bad code at best and game crushing at worst(such as placing AI into tick) its not so hard to find a random point from actor check if he can go there and then send him there.
3.You just need an actor generator, many ways to do it but as I see it you need it with volume(more like just a box) get the box dimensions and spawn inside it from actor array that you created, random numbers from random int. Good luck.