From Game Editor
Revision as of 11:12, 18 June 2009 by Skydereign (Talk | contribs)
rand is one of the simpler functions. It takes what value you enter and returns a random number between 0 and your value.
Example:
int a; a = rand(5);
The function returns a value that is equal to a random number from 0 to 4. Remember that rand by default returns a double and treats your supplied value as a double.