In my platformer, my enemies will not 'see' the player from far away. But when the player gets close enough they will see the player. And once they do, I want them to follow the player until they are killed.
I was hoping to use the following code. I want to use 'trigger once' to keep this code from running every tick for each enemy once they have the increase LOS range. But 'trigger once' makes it so that this code only runs for the first enemy that sees the player. I know I can use an enemy instance variable like 'seesPlayer' and set it / check for it, but I'm all about keeping IVs to a minimum (I have so many already).
Is there a way to write this code so that it runs only once for each enemy object?
Thanks