How to get a random number-variable with fixed intervals (20-40-60 etc)

newbie-question

#1

Hello,

Im trying to create some sort of roulette with 18 numbers, and I need to randomize the spinning.

So I’ve added a rotate action with this formula: [[(Math.random()) * 361).tofixed(0)]]

But I need to get only intervals of 20 (0-20-40-60-etc).

I don’t know how to create an array so if someone can help me out with the complete formula, pls? :slight_smile:

Thanks!


#2

try [[(Math.random() * 18).tofixed(0)*20]]