Page 1 of 1

rng in supertux?

PostPosted: 21 Feb 2018, 23:19
by sinisa3games
is it possible to make a random number generator in supertux?

Re: rng in supertux?

PostPosted: 21 Feb 2018, 23:30
by brmbrmcar
int rand() exists, but I don't know how to use it.

Re: rng in supertux?

PostPosted: 22 Feb 2018, 00:35
by Tobbi
Try

{l Code}: {l Select All Code}
random_num = <- rand();
print(random_num);


iirc, it should be a random number between 0 and 1.