Hey,
I was searching the web and I couldn't find an easy answer. Using arrays in Lua
is quiet different. I have an array with some integers like:
local yPositionsArray = {66, 158, 250, 342, 434, 526}
then I want to pick a random value from this array. I tried this:
local startY = math.random(#yPositionsArray)
and
local startY = math.random(1, #yPositionsArray)
None of them will work. You will get values from 1 to 6.
Thanks,
Marc
Comments
Regards,
Marc