I have an enemy running around in a circle. The enemy will break this circle when the player enters its line of sight. Upon the player leaving the line of sight of the enemy, the enemy will resume its circle at the new point. How would I get the enemy to return to its original position and resume its circle again?
The circle is coded as such:
----------------------------------------------------------------------
Every Tick:
enemy: >Move forward 1.5 pixels
>Set angle to enemy.angle+0.96 degrees
----------------------------------------------------------------------