This is a read-only snapshot of
the ComputerCraft forums
, taken in April 2020.
ComputerCraft
→
Ask a Pro
[Question]Can u use a pick random somehow like random number or rs pulse?
Started by Uch1ha_Sasuke, 19 June 2012 - 06:08 PM
Uch1ha_Sasuke
#1
25 posts
Posted 19 June 2012 - 08:08 PM
Can i make my computer pick a random number??
MysticT
#2
1604 posts
Posted 19 June 2012 - 08:11 PM
Use math.random:
http://www.lua.org/manual/5.1/manual.html#pdf-math.random
You may also want to use math.randomseed:
http://www.lua.org/manual/5.1/manual.html#pdf-math.randomseed
Uch1ha_Sasuke
#3
25 posts
Posted 19 June 2012 - 09:45 PM
Thanx