What's new

Solved Generate random number

Status
Not open for further replies.
R1ch4rd

R1ch4rd

Like a baaaws
Messages
396
Reaction score
62
I want to generate a random number ranging from 0 - 9, and set i as the result, but I don't know how to do it. Please help!
 
R1ch4rd

R1ch4rd

Like a baaaws
Messages
396
Reaction score
62
If you're not going to post anything helpful, then leave.
 
H

hitman12319

Enthusiast
Messages
122
Reaction score
2
He did, random.org is a random number generator...
 
R1ch4rd

R1ch4rd

Like a baaaws
Messages
396
Reaction score
62
OK then, I'll rephrase it a bit. I want to know the code that I have to put into my patch_mp.ff to generate a random number ranging from 1 - 9, and then have it set as i.
 
renegade770

renegade770

Enthusiast
Messages
1,336
Reaction score
172
i = randomInt(5);
generates number between 0-4
at least i think that should work. i just kinda stole it from killndyl's zombies. he uses it to give random weapons.
 
BigWalrus

BigWalrus

Enthusiast
Messages
2,001
Reaction score
880
i = randomInt(5);
generates number between 0-4
at least i think that should work. i just kinda stole it from killndyl's zombies. he uses it to give random weapons.
yes that is exactly how it works.
 
Status
Not open for further replies.
Top Bottom