Choosing randomly from remaining values without choosing the previous values

I have 4 waves of enemies in my game. it is an endless runner game. I want each wave to play randomly until they all have been played. Without the same wave coming up again on each cycle.

What I mean is, I'd like to have
wave 3, wave 2, wave 4, wave 1, (cycle complete - start again) wave 1, wave 4, wave 2, wave 3, (cycle complete - etc....)

and not
wave 3, wave 3, wave 2, wave 1 -OR- wave 1, wave 4, wave 1, wave 2.

I've been playing around with this for ages but I still can't get it right. does anyone know how to check if a attributes value has already been done so it chooses randomly from the remaining values.

Thank you! :)

Comments

Sign In or Register to comment.