Notifications
Clear all

[Closed] Random generation from pre-defined values?

Hi, I know it is possible to create with Random 1 100 but how do you create by randomly selecting pre-defined values e.g.

Create a box by randomly selecting 50 100 150 or 200 for the length.

cheers, K

4 Replies
1 Reply
(@denist)
Joined: 1 year ago

Posts: 0

(random 1 4)*50

Thanks Denis, I’m such a dumbass…that seems so obvious when you point it out. Sometimes I cant see the wood for the trees!

Cheers

 lo1

And in case the values you want are not multiples of n:

possibleValues = #(1,53,1232,432.4)
randomValue = possibleValues[random 1 possibleValues.count]

Thanks Lo this is also very useful