The problem here is that inside a function, there is say, the following code:
function blah()
{
setRandomSeed(1231410857510857584752610452674907490747475251113186867577116104117842712211751241120756767676774877366);
for(%a = 0; %a < 50; %a++)
{
echo(getRandom(0, 100));
}
}
Try that on mac and pc, it will return different results.
Why?
How can I fix that?
Try doing setRandomSeed inside of the for loop (ie. directly before each getRandom call). If that doesn't work, use a linear-congruential generator, it's the fastest RNG (especially in Torque) and it works fine for everything but cryptography. I've used it for terrain generation before.
EDIT: To clarify, yes I completely understand how seeds work, but there is a (tiny) chance that setRandomSeed in fact sets what previous seeded values to use, and doesn't actually re-seed the RNG. It could be that the seed is being changed in the background before the getRandom call. Again unlikely, just making hopeful guesses so you don't have to result to your own TorqueScript (yuck) implementation of an RNG.