equal
deleted
inserted
replaced
467 === <tt>!GetMissionVar(varname)</tt> (1.0.0) === |
467 === <tt>!GetMissionVar(varname)</tt> (1.0.0) === |
468 Returns the value of the mission variable `varname` as a string. See also `SaveMissionVar`. |
468 Returns the value of the mission variable `varname` as a string. See also `SaveMissionVar`. |
469 |
469 |
470 == Randomness == |
470 == Randomness == |
471 === <tt>!GetRandom(number)</tt> === |
471 === <tt>!GetRandom(number)</tt> === |
472 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`. |
472 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. |
|
473 |
|
474 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`. |