fRand() range
Posted: Fri Dec 15, 2017 4:13 pm
Recently I saw this
what made me curious about the range of fRand(). Wiki says Returns a random number between 0 and 1, and above ScriptWarning supports this.
Quite crooked because all other random generators I know have the range
and in GreenBlob.ucScriptWarning: GreenBlob MH-Fuedal(SB)V2.GreenBlob72 (Function UnrealShare.GreenBlob.Setup:0014) Accessed array out of bounds (5/5)
Code: Select all
simulated function Setup(vector WallNormal){
Texture = BlobTypes[int(Frand()*5)];
Velocity = VRand()*140*FRand()+WallNormal*250;
DrawScale = FRand()*0.3 + 0.2;
}
Quite crooked because all other random generators I know have the range
Code: Select all
Min <= RandValue < Max