by sinisa3games » 21 Feb 2018, 23:19
is it possible to make a random number generator in supertux?
'Ello
-
sinisa3games
-
- Posts: 117
- Joined: 08 Feb 2018, 20:45
- Location: Right over there
by brmbrmcar » 21 Feb 2018, 23:30
int rand() exists, but I don't know how to use it.
brmbrmbrmbrmbrmbrmcar
-
brmbrmcar
-
- Posts: 357
- Joined: 24 Oct 2015, 14:46
by Tobbi » 22 Feb 2018, 00:35
Try
- {l Code}: {l Select All Code}
random_num = <- rand();
print(random_num);
iirc, it should be a random number between 0 and 1.
SuperTux developer.
-
Tobbi
- SuperTux Moderator
-
- Posts: 353
- Joined: 12 Oct 2013, 13:08
Who is online
Users browsing this forum: No registered users and 1 guest