Hi, I need to create a random whole number between - 50 and 50. I’ve looked at a few posts abuout random numbers but can’t figure this out.

I have figured it out.

What was the function you used?

[[Math.floor(Math.random() * 280 - 140)]]

Basically multiply the number by 280 then minus half that nuber to balance the random numbers over zero. I’m now stuck trying to get it to only trigger when on the game board. I have the logic right but it isn’t paying any attention to whether it is still on the game board or not.

1 Like