LuaAPI.wiki
changeset 43 c07e89eded71
parent 42 565e15a60043
child 44 bf53e635a2ac
equal deleted inserted replaced
42:565e15a60043 43:c07e89eded71
   324 <blockquote>Returns the current zoom level
   324 <blockquote>Returns the current zoom level
   325 </blockquote>
   325 </blockquote>
   326 
   326 
   327 === <tt>!GetRandom(number)</tt> (0.9.14) ===
   327 === <tt>!GetRandom(number)</tt> (0.9.14) ===
   328 
   328 
   329 <blockquote>Returns a randomly generated number in the range of 0 to number - 1. 
   329 <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.
   330 </blockquote>
   330 </blockquote>
   331 
   331 
   332 === <tt>!SetWind(windSpeed)</tt> (development) ===
   332 === <tt>!SetWind(windSpeed)</tt> (development) ===
   333 
   333 
   334 <blockquote>Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control.
   334 <blockquote>Sets the current wind in the range of -100 to 100. Use together with gfDisableWind for full control.