- Home /
How to make a list with unique strings randomly
Okay, I'm nearly positive this has been asked already, but I can't seem to find it, so sorry about that.
So in my script, I have a list of 10 names using a String[]. I call this the masterList. Then I have a second string[] list, called temp, that has 3 blank spaces.
What I'm trying to do is fill temp with 3 random names from the masterList, but with no repeats.
For example, it would chose "Susan" for the 1st string. Easy enough. But then, if it chose "Susan" for the 2nd string, it would pick another name from the list, e.g. "Jessica".
I hope this is clear. And thank you in advance for any help!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Generate a random string from a specified length. 1 Answer
Random role assigning from string array 1 Answer
Distribute terrain in zones 3 Answers