How to make enemies detect the player specifically?


When they have seen a player, I would like my enemies to be able to fire up a node that states they have detected the player. Currently, they are detecting everything, which is a step in the right direction, but I am hoping to implement a system that will allow them to chase the player when they see him. I don’t want them to start chasing the player as soon as they see any pawn, I want them to chase the player when they see the player. I currently have set up the enemy to detect enemies, friendlies, and neutrals, as that is the only thing that seems to work for me at the moment. (check the AIPerception picture, you’ll know what I mean).

A simple thing I’ve found is just to use casting as a gate. So it only fires the script if it successfully cast to that specific actor type.

Alternatively you could use an equal object and would get the same result, I don’t simply because I want to get information from the object.