SorenRand?

Ninja2

Great Engineer
Joined
Nov 17, 2005
Messages
1,142
Location
Denmarkia
Could someone please explain how this function works? I know it's a random number generator, but how does it work?
 
You pass it a number (n), it gives you back a number in the range 0 to (n-1)
 
Thanks! :) So if it reads: if(GC.getGameINLINE().getSorenRandNum(5, "Unit") < 1) -- it will give me a number between 0 and 4, I suppose, and returns true if the random number is a 0? I.e. a 20% chance? What does "unit" refer to?
 
That's just a name for that generation. I think you can see it when reading through debug logs or something.
 
Back
Top Bottom