footballjds
2011-03-21 10:00:26
for a not-important reason i was looking at MMouse and noticed:
it isn't truly random if it is ALWAYS adding… (:
why not:
The first will always add to the coordinates, while the second will randomly add or subtract from the coordinates… More randomness if you ask me.
Example:
MMouse(100, 100, 1, 1); right now will move the mouse to:
MMouse(100, 100, 2, 2); right now will move the mouse to:
MMouse(100,100, 1, 1); with my example change will move the mouse to:
We go from 0(4 if using a 2 for rx/ry) possible outcomes to 9 possible outcomes. This is obviously more random.
X := x + random(rx);
Y := y + random(ry);
it isn't truly random if it is ALWAYS adding… (:
why not:
X := x + RandomRange(-rx, rx);
Y := y + RandomRange(-ry, ry);
The first will always add to the coordinates, while the second will randomly add or subtract from the coordinates… More randomness if you ask me.
Example:
MMouse(100, 100, 1, 1); right now will move the mouse to:
100, 100
MMouse(100, 100, 2, 2); right now will move the mouse to:
100, 100
100, 101
101, 101
101, 100
MMouse(100,100, 1, 1); with my example change will move the mouse to:
99, 99
99, 100
99, 101
100, 99
100, 100
100, 101
101, 99
101, 100
101, 101
We go from 0(4 if using a 2 for rx/ry) possible outcomes to 9 possible outcomes. This is obviously more random.