LuaGameplay: Clarify limitations of GetRandom
authorWuzzy
Thu, 10 Oct 2019 22:33:36 +0100
changeset 2006 75df3ddba09c
parent 2005 017b57b75854
child 2007 be514c1e3989
LuaGameplay: Clarify limitations of GetRandom
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 ==
 === <tt>!GetRandom(number)</tt> ===
-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`.