Wendell
Member
Guys, I'm in the need of some light for two things:
1.
Lets assume that I have 20 rooms in my game, numbered from 1 to 20.
Whenever you enter a new room, the next one will be one of the other 19, chosen at random.
How can I make to, after entering a new room, the one I was previously would not be repeated when I go to the next? This way I can randomly visit all 20 rooms without repeating none.
I believe that this can be done with an Array, to store all rooms and then removing them as need but I cannot find a way for this to work properly.
2.
Now let's suppose that I have 30 rooms but I want only 20 to be chosen at random to form that previous 20 room list. No idea on how to do this as well, as all my attempts failed miserably.
Any ideas?
1.
Lets assume that I have 20 rooms in my game, numbered from 1 to 20.
Whenever you enter a new room, the next one will be one of the other 19, chosen at random.
How can I make to, after entering a new room, the one I was previously would not be repeated when I go to the next? This way I can randomly visit all 20 rooms without repeating none.
I believe that this can be done with an Array, to store all rooms and then removing them as need but I cannot find a way for this to work properly.
2.
Now let's suppose that I have 30 rooms but I want only 20 to be chosen at random to form that previous 20 room list. No idea on how to do this as well, as all my attempts failed miserably.
Any ideas?