I have this problem that the random numbers I store into global variables aren't regenerated when the game restarts. Any ideas?
Btw, I assign the values in the first room of the game after the restart point.
What do you mean, they aren't regenerated?
You mean they are the same value?
It's probably because the random number generator is reset when the game is restarted, so it produces the same values again.
Try using the current time to randomise the sequence.
DateTime *dt = DateTime.Now;
int i = 0;
while (i < dt.Second)
{
int dummy = Random(1);
i++;
}
// your code here
Hey, that worked like a charm! Thanks! :D