|
-
Feb 6th, 2000, 03:05 AM
#1
Thread Starter
Hyperactive Member
I know you can randomize by putting a = (rnd * 5) but that is form 0 - 5 is there a way to pick random number out of a bunch of numbers? for instance. pick a random number out of 1,50,100,63,78,1000 so it will randomly pick one of those numbers. Thanks!!
------------------
Sincerely,
Chris
:-) ;-)
just have fun out there and live life to the fullest while it is still here
Email [email protected]
-
Feb 6th, 2000, 03:17 AM
#2
Addicted Member
put the numbers into an array an let the random function pick the numbers out of it!
ok, it's rather complicated but it works.
number = numberarray(Int(Rnd() * numbercount))
------------------
Razzle
ICQ#: 31429438
-
Feb 6th, 2000, 03:23 AM
#3
Thread Starter
Hyperactive Member
I don't quite get it could you give me an example please?
------------------
Sincerely,
Chris
:-) ;-)
just have fun out there and live life to the fullest while it is still here
Email [email protected]
-
Feb 6th, 2000, 03:35 AM
#4
numberarray(0) = 1
numberarray(1) = 50
numberarray(2) = 100...etc
numberarray(3) = 63
numberarray(4) = 78
mynumber = numberarray(int(rnd * 4))
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|