Page 1 of 1

random variables...

PostPosted: Fri May 04, 2007 10:47 pm
by Oman
I would like to know how to, on create actor of my enemy, change my variable to a number anywhere between 1 and 10.

Any help is appreciated :)

PostPosted: Fri May 04, 2007 11:05 pm
by Sgt. Sparky
Code: Select all
your_variable = 1 + round(rand(9));

if you want it to not be a round number (whole number) make the variable real and use,

Code: Select all
your_variable = 1 + rand(9);

:D

PostPosted: Sat May 05, 2007 1:18 am
by Oman
Thanks a bunch!
I will try that as soon as i can...