HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do I make a "choose random level" trigger?

08-16-2003, 07:29 PM#1
Nagna Zul
Like the one in Uther party

Something that would choose a random level, but never play the same one twice.

I already have a small idea, make a trigger variable with an array of 12 (There are 12 levels right now in this map), set that variable to the "start level X" triggers I have, then make it choose a random array between 1 and 12, but how do I make sure it never plays the same one twice?
08-16-2003, 07:36 PM#2
Pesmerga
Ummm, I have a solution, but not the best one. This question was already asked, and since its not a simple trigger, use the search engine on this site to find it.
08-16-2003, 07:43 PM#3
Kakumei
i'm not sure how to word this in exact GUI but ill tell you what you can do. also, this is assuming youre picking the random level by using the Choose random integer condition, heres what you should do.

to make sure you dont choose the same level twice, theres a few things you need to do. set each level as a boolean variable (an array is fine.. so something like LevelAlreadyPlayed[LevelValue])

when a level starts, set a boolean variable that sets the current level's boolean array value equal to False. add an If/Then/Else in the actions. that should be something like If Level#AlreadyPlayed equal to true, then play that level, else choose another random number. that should work. tell me if it doesnt or you dont quite understand what im saying and ill go into the GUI format for you.
08-16-2003, 07:46 PM#4
Nagna Zul
Ah, thanks, I had already tought about that, but I tought there was an easier solution. Well, thanks.