PDA

View Full Version : Repeat random numbers problem


meandmymachine
07-23-2004, 08:44 PM
Is there any way of preventing repeat numbers in random number generation?

I’ve tried using the pop function and the delete function on elements in an array which are randomly selected, but can’t get the effect I want. I’ve even tried making two variables equivalent to each other to try and constrict repetition –but no joy.

Can anyone give me any more ideas? Many thanks.

meandmymachine

CyanBlue
07-23-2004, 09:00 PM
Howdy and Welcome... :)

Please search the forum before you post the question... :)

Open up this thread
http://www.actionscript.org/forums/showthread.php3?t=31471
and search for this line...
How to Generate Unique Random Numbers

There are more in the forum as well... :)