In the game, I use one sprite to have several enemies who are identical sprites placed in different locations on the layout.
Each enemy has an instance variable called ‘AP,’ and they all start with 10 AP.
Now, when I press the spacebar (start his turn), a sequence of events should occur. First, the system selects ONE random enemy, sets a timer to decrement its AP by 1 every 0.1 seconds until it reaches 0. Once an enemy’s AP reaches 0, the system selects the next enemy, and the process repeats. When all enemies have 0 AP do something, for example start Player turn. How can I achieve this?