Hey guys im programming a basic back and forth enemy , all it does to "animate" is flip the enemy's sprite every time it hits a boundary point where it tells the enemy to turn around, however it will constantly tell the sprite to do this because their are multiple enemies in the level at the same time so it gets the trigger to flip from then as well , resulting in the sprite constantly flipping. (Coding Attached)
Any suggestions aside from cloning and copying the Coding-for each one , any feed back will be greatly appreciated Thank you very much .