Many ways you could do this, first that comes to mind is to Create an instance variable called order.
At the beginning of your battle use:
On whatever trigger you like
Repeat Enemy.count times
Pick nth enemy (nth being loopindex)
- Set enemy.order to loopindex+1
This will provide you with a number for your enemies from 1 to however many enemies there are.
Create a static local or global variable called var_order with initial value of 1.
Then following those events start a timer to begin picking enemies to fight
so
On battle ready trigger
- Start timer "action" (once) for random(0.5,2) (or whatever your timings are)
On timer "action"
Pick enemy where enemy.order=var_order
- Do Enemy action
Sub event:
if var_order<enemy.count
- add one to var_order
- Start timer "action" (once) for random(0.5,2)
else
- Set var_order to 1
- Start timer "action" (once) for random(0.5,2)
you will also need some events to shift the enemy.order variable down if an enemy is destroyed.
Create another global or static local variable called "var_ordershift" and a function called Ordershift.
Whenever an enemy meets the criteria to be destroyed have it trigger:
On your trigger
- set var_ordershift to enemy.order
- call Function "Ordershift"
- Destroy Enemy
On Function "Ordershift"
Pick Enemy by evaluating: enemy.order>ordershift
Sub event: For Each Enemy
- Enemy: Subtract 1 from enemy.order
Hope that helps