Page 1 of 1

random number decimals

PostPosted: Mon Mar 14, 2011 3:30 am
by 157pl
is it possible to create a random number with decimals
i cant seem to get it to work

Re: random number decimals

PostPosted: Mon Mar 14, 2011 5:41 am
by skydereign
rand() gives a random decimal. Just make sure you aren't using an int to hold that value. A simple way to demo this is create a text actor. In its create actor event, use this.
Code: Select all
textNumber=rand(1);

Re: random number decimals

PostPosted: Mon Mar 14, 2011 6:29 am
by 157pl
apparently i forgot to change my variable to a real
thanks for the help