What's the easiest way to generate a random number in the range of 0-29?
This is the static archive of the Massassi Forums. The forums are
closed indefinitely. Thanks for all the memories!
You can also download
Super Old Archived Message Boards
from when Massassi first started.
"View" counts are as of the day the forums were archived, and will no longer increase.
// random number between 0 and 6. Will very rarely be 6. x = y[Rand() * 6];
randomNumber = rand() * 29; randomNumber = (randomNumber + 0.5) - (randomNumber + 0.5) % 1;
randomNumber = rand() * (Y - X) + X;
symbols model player0 model player1 model player2 code ......... num = Rand() * 3; SetPlayerModel(Player, player[rand]);
for(i=0; Rand() != 1; i=i+1); PrintInt(i);