luksamuk Posted April 12, 2012 Report Share Posted April 12, 2012 So yeah, a friend of mine was asking me about randomizing values in MMF2, and although he seemed to just use the random() instruction, I always felt like it didn't randomize properly... and I don't wanna use extensions either. So, I was wondering, is there any way you can successfully implement THIS C code in MMF2? #include <iostream> #include <cstdlib> #include <ctime> const int maxValue = 4; int main() { srand(time(NULL)); //Makes the randomizer... really randomic return rand() % maxValue + 1; //Returns a random value between 0 and the maxValue } Link to comment Share on other sites More sharing options...
Recommended Posts