Events are applied to all enemies at once

How can I make events work with each “enemy” separately? For example, I want the “enemy” to look at the player. I use “compare the numbers enemy.x() and player.x()” and use this to find out which side of the enemy the player is on, but the problem is that if the player is between two enemies, then the enemies will be turned in one direction.

in this screenshot, little can actually be seen, but still, it doesn’t work!

You have to make sure you are using the event for each object you code should be like this:

Thanks for help
it workin’!

1 Like