HELP! (with spawning obstacles)
I want my game to have 2 different obstacles that spawn. One that spawns at a low Y position, and the other at a higher Y position (for example, obstacle A's Y position is 30, and obstacle B's Y position is 60). Both of these obstacles are moving from right to left (they spawn outside of my game's screen, and they then move towards my character to try and hit him), but that's not really what I need help with.
My issue is that I want those obstacles (the one that spawns at a low Y position, along with the other one that spawns at a higher Y position) to spawn ONE AT A TIME AT RANDOM ORDER, and then move, as planned, from left to right across my game's screen, as they are trying to hit my character. For example, obstacle A could spawn twice, then obstacle B spawns once, then obstacle A spawns once, than obstacle B spawns 4 times, then obstacle A spawns twice, and so on... Please help me with this on how to do it. I just can't figure it out...