Step 1:
Create an sprite and give any behaviour that allows movement (for example, platform behaviour)
Step 2:
Create an sprite for an enemy, with some particulary easy to see animation, for example, an arrow.
Step 3:
Insert this code
"if enemy.x > player.x {set enemy.angle=180;} else { set enemy.angle=0;}"
Step 4:
In the layout, Ctrl+MouseLeftButton to make a copy of various enemies.
then run the cap and observe that not all the enemies turn around, some of them wait until tle player moves his X to the greates or lowest position. So, some of them turn around some of the other doesn´t....nosense.
This makes coding an enemy AI really difficult.
But you can make this works by inserting "for each enemy" condition, however this only works in this case, when you have private variables and the number of the sprites is big, you cannot use "for each" condition, for other reasons, because its not supose to work like that....so there is no way to clearly separate the behaviour of several enemies of the same object