LuaAPI.wiki
changeset 1219 b467502126fd
parent 1218 344aa78491f6
child 1220 95e46764178a
equal deleted inserted replaced
1218:344aa78491f6 1219:b467502126fd
  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`.