I'm trying to find a way to choose a random number from a specified list. Something like this:
Code: Select all
x = x + choose(1, 2, 3, ...)
Is there a way to do this?
Code: Select all
x = x + choose(1, 2, 3, ...)
Code: Select all
love.math.random( lowest, highest )
Code: Select all
list = { 1, 2, 47, 3, math.pi }
print( list[love.math.random( #list )] )
Users browsing this forum: Amazon [Bot], Google [Bot] and 4 guests