LuaAPI.wiki
changeset 405 4e1c166740b0
parent 404 37d44392ad2b
child 406 41bd558039c0
equal deleted inserted replaced
404:37d44392ad2b 405:4e1c166740b0
   772     -- clears input mask, allowing player to take actions
   772     -- clears input mask, allowing player to take actions
   773     SetInputMask(0xFFFFFFFF) 
   773     SetInputMask(0xFFFFFFFF) 
   774 		</code>
   774 		</code>
   775 Note: Using the input mask is an effective way to script uninterrupted cinematics, or create modes such as No Jumping. 
   775 Note: Using the input mask is an effective way to script uninterrupted cinematics, or create modes such as No Jumping. 
   776 
   776 
       
   777 ==== <tt>!GetInputMask()</tt> ====
       
   778 
       
   779 Returns the current input mask of the player.
       
   780 
       
   781 ====
   777 
   782 
   778 === Randomness ===
   783 === Randomness ===
   779 ==== <tt>!GetRandom(number)</tt> ====
   784 ==== <tt>!GetRandom(number)</tt> ====
   780 
   785 
   781 <blockquote>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 can use the Lua random, but adding a regular gear should use GetRandom.
   786 <blockquote>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 can use the Lua random, but adding a regular gear should use GetRandom.