I’m creating an enemy ai system and I want to figure out how to determine which player is closest, but also visible to see, to chase. Right now my code only gets the closest player (no matter if there is a wall or not) and sticks with it permanently It (In the picture example, it would think only the player on the bottom right exists and chase once their visible. Any ideas on how to fix? Would really appreciate it. (Custom event linked to a Set Timer By Function Name)
My current code
Result
Thanks for clicking.