So what i am using is a program called gamemaker studio. The language is very C++ oriented so excuse the slightly different syntax, but if you answer in C++ I will know exactly what you mean.
Now on to the question. So in this game there are 5 lanes. I want 2-4 asteroids to appear in 2-4 different lanes. The openspot variable is the X axis in the game and the switch will set the asteroid to different lanes. How do I get the switch to chose a different case every time it loops? If it chooses case 3 by random, how do I get 0,1,2,4 to be only ones left?
Your problem boils down to having n unique random numbers in the range 0-4, so push_back() these numbers into a std::vector<int> and std::shuffle() the vector, then you can choose any three of the vector's cells as your lanes