
Originally Posted by
Sir R. M8gic1an
Whats the point of minus?
RWait(500, 75, 25, true)
is exactly the same as
RWait(500, 50, 0, false)
every single time...
-RM
Not sure where that fourth parameter has come from.
Having minus set as true gives the effect of
Simba Code:
+ RandomRange(-RTime, RTime)
whereas having it false does
EDIT:
Simba Code:
program Test;
var
I : Integer;
function RWait(Time, RTime : Integer; Minus : Boolean) : Integer;
begin
Result:=(Time + RandomRange(- (Integer(Minus) * RTime), RTime));
end;
begin
WriteLn('Minus FALSE');
for I:= 0 to 9 do
WriteLn(RWait(5000, 2500, False));
WriteLn('');
WriteLn('');
WriteLn('');
WriteLn('Minus TRUE');
for I:= 0 to 9 do
WriteLn(RWait(5000, 2500, True));
end.
Run that and you get:
Progress Report:
Minus FALSE
7360
6214
7470
5257
7150
6051
7484
7185
5645
7056
Minus TRUE
2929
6307
6847
5708
3452
7048
7112
3442
4365
4090
Where the numbers would be the time waited. Notice with Minus as True that it has the chance to minus random RTime instead of just adding it on.