# HG changeset patch # User Wuzzy # Date 1570743216 -3600 # Node ID 75df3ddba09c61d6310ffb8cfe6c25790ce4092b # Parent 017b57b75854e6b17c5ba0fa9086e50005fcd96b LuaGameplay: Clarify limitations of GetRandom diff -r 017b57b75854 -r 75df3ddba09c LuaGameplay.wiki --- a/LuaGameplay.wiki Thu Oct 10 20:41:46 2019 +0100 +++ b/LuaGameplay.wiki Thu Oct 10 22:33:36 2019 +0100 @@ -469,4 +469,4 @@ == Randomness == === !GetRandom(number) === -Returns a randomly generated number in the range of 0 to number - 1. This random number uses the game seed, so is synchronised, and thus safe for multiplayer and saved games. Use `GetRandom` for anything that could impact the engine state. For example, a visual gear could simply use Lua’s `math.random`, but adding a regular gear should use `GetRandom`. +Returns a randomly generated whole number in the range of `0` to `number - 1`. `number` must be a whole number >= 1. This random number uses the game seed, so is synchronised, and thus safe for multiplayer and saved games. Use `GetRandom` for anything that could impact the engine state. For example, a visual gear could simply use Lua’s `math.random`, but adding a regular gear should use `GetRandom`.