Do anyone know of a good way to do like 10 random numbers and make sure they are all different?
Printable View
Do anyone know of a good way to do like 10 random numbers and make sure they are all different?
You could save each random number and if the random number generated is similar to any of the previous ones, generate a new one?
I made this example a while ago: https://dl.dropboxusercontent.com/u/.../Tilfeldig.mfa
I am still struggling with this. If anyone could help I would be really happy! :)
That's because you add to the x-index before writing to it.Quote:
I have one question though, it seems I need to use an dimension of 6 in the array if I want to create 5 random numbers. Why do I need to use dimension 6 and not 5?
I've attached an updated example including another solution to the problem. I also wrapped your method into a fastloop so that the numbers are generated instantly.
No idea, but probably not since I haven't heard about that game before :)
^^ Could be the actual popcorn food. Like say the programmer ate a **** ton of popcorn all night while making his game. ^^