The Question
Member
Ok, I'm sure this is easy, but I'm not sure how to go about it.
My code when it is the enemies turn.
This works perfectly. However every enemy moves at the same time in the same step. I need each
enemy to take turns doing their movement code. It doesn't matter what order they move in, why
it would be better if I could randomize the order a little so they don't get stale.
What I thought of doing is setting up a global variable "global.enemy_is_moving = true" and
when the event_user(0) is done setting it back to false so the loop can continue but I'm not sure
how to go about pausing a with statement without stopping the game.
My code when it is the enemies turn.
GML:
with(obj_enemy_par)
{
//do enemy movement
event_user(0);
}
enemy to take turns doing their movement code. It doesn't matter what order they move in, why
it would be better if I could randomize the order a little so they don't get stale.
What I thought of doing is setting up a global variable "global.enemy_is_moving = true" and
when the event_user(0) is done setting it back to false so the loop can continue but I'm not sure
how to go about pausing a with statement without stopping the game.