Expanding my AI's functionality

Hi there,

So I’ve done a basic tutorial for AI and I have a monster randomly roaming to points within a radius, all good.
Now I want that to happen but also if it spots the player, it should make a bee-line for him, move to the last known point he was seen in (should the player goes out of LoS at any point), and when it gets there, do a little check, if nothing seen, return to random roam.

Not sure how to add in the stuff about spotting the player. I have added a ‘Pawn Sensing’ component into the AI character, and that’s about it.

Any help will be appreciated, though I would probably only be able to understand it if someone shows me how to do it via screenshots of the script, then I can take that and expand further and tweak it. If someone describes how to do it, my knowledge of scripting is not usually enough to just freestyle it!

Thanks,
Daz

In that first screenshot, I know I have to do some checking in there for the player character or something, and then reflect that task somewhere in the next screenshot, but just not sure exactly.

If someone knows even of a decent tutorial that may help me? Seen some but of mixed quality
thx