Author Topic: Torque's random function  (Read 2843 times)

What is Torque's random number function called.  I tried to search the forums but I was unable to find anything.

Quote from: torquescript commands.rtf
getRandom([[max]||[min,max]])
   -Used to get a random number
   -Numeric return
   
   %random = getRandom(34,176);

i forget where i got the file that lists all of torquescript's commands, maybe ill look it up for you ;)

edit: well, i couldnt find it anywhere, so i uploaded it. heres the link:
http://www.mediafire.com/?4o2m0tmzkam
« Last Edit: May 06, 2007, 11:13:53 PM by Zor »

Also, two handy functions:

setRandomSeed([seed])
   -Used to set the required “seed” for the MOD
   -No return type


getRandomSeed()
   -Used to get the “seed” for the MOD
   -Numeric return type

If the game uses randomly generated levels you could have a way for the client to be able to reset the 'seed' for random numbers if they wanted to play a specific level again. All they would have to write down is a number.

* Note to self: Make a random code maker.

If its a note to you, why do you have to tell everyone else?

It's a publicly announced note to self.