Jump to content

Math:Random() doesnt work


Recommended Posts

i am not really sure how to access constans in Lua because i had problems accessing

local pi = Math.Pi

 

but i found that "math.pi" works.

 

 

Maybe that part of the documentation is C++ only because there is no Lua example?

 

 

Edit:

tested the included lua math class and

math.randomseed( Time:Millisecs() )
math.random()

works too.

 

That way you could at least also use your own random seed if you need to.

Link to comment
Share on other sites

  • 4 weeks later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...