To generate a random int value, use Rand(x), where x can be any positive value. The random number generated will be between 0 and (x-1).
Note that the maximum random value generated by this function is 0xFFFF, even if you specify a much larger x.
To generate a random float value bewteen 0.0 and 1.0, use FRand(). You have to manually "stretch" and "move" the range of values or you can use RandRange(min, max) to do it for you.
To generate a vector of length 1 that points in a random direction, use VRand(). Multiply it with a random float value to get a random length as well.
To generate a random rotator value, use RotRand(bRandomRoll). Leave out the bool parameter or set it to False if you want the random rotator to have a Roll value of 0.
None of these functions require seeding and they are all static "global" functions declared in the Object class.
Comment