1128 See also [GearMessages]. |
1128 See also [GearMessages]. |
1129 |
1129 |
1130 ==== <tt>!GetInputMask()</tt> ==== |
1130 ==== <tt>!GetInputMask()</tt> ==== |
1131 Returns the current input mask of the player. |
1131 Returns the current input mask of the player. |
1132 |
1132 |
1133 === `SetVampiric(bool)` (0.9.24) === |
1133 ==== `SetVampiric(bool)` (0.9.24) ==== |
1134 Toggles vampirism mode for this turn. Set `bool` to `true` to enable (same effect as if the hedgehog has used Vampirism), `false` to disable. |
1134 Toggles vampirism mode for this turn. Set `bool` to `true` to enable (same effect as if the hedgehog has used Vampirism), `false` to disable. |
1135 |
1135 |
1136 === `SetLaserSight(bool)` (0.9.24) === |
1136 ==== `SetLaserSight(bool)` (0.9.24) ==== |
1137 Toggles laser sight for this turn. Set `bool` to `true` to enable (same effect as if the hedgehog has used Laser Sight), `false` to disable. |
1137 Toggles laser sight for this turn. Set `bool` to `true` to enable (same effect as if the hedgehog has used Laser Sight), `false` to disable. |
1138 |
1138 |
1139 === Randomness === |
1139 === Randomness === |
1140 ==== <tt>!GetRandom(number)</tt> ==== |
1140 ==== <tt>!GetRandom(number)</tt> ==== |
1141 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`. |
1141 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`. |