Raised This Month: $ Target: $400
 0% 

other way of while loop?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kmal2t
BANNED
Join Date: Apr 2006
Old 05-25-2007 , 04:23   Re: other way of while loop?
Reply With Quote #10

I think I know what you mean and I did something like this the other day with 2 for loops to have one give numbers and the other check the numbers for repeats.

Personally I'd like to see a function that could assign numbers to arrays for a random number set. I.e if you have an array[10] those array[0] through array[9] would each be given randomly one of the numbers between 1-10 so that none of the arrays have the same number like:
new array[6]
command(array)
then with a get_command(array) you would know that:
array[0] = 3
array[1] = 5
array[2] = 6
array[3] = 2
array[4] = 4
array[5] = 1
etc. etc.

You could use this to easily shufle players to different groups or give each player unique things like every player has one random individual weapon or characteristic without having to check if a number has already been used.

Last edited by kmal2t; 05-25-2007 at 04:25.
kmal2t is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode