I hope there is someone who can help here
how do I get a random number between 1 and 20, but it may not be able to choose 3 and 15
value = choose(1,2,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20)
Develop games in your browser. Powerful, performant & highly capable.
Random(N) - Returns a random number between 0 and N, not including N. The result includes fractions, so random(3) can return 2.5. Use floor(random(n)) to generate a random whole number up to but not including N, e.g. floor(random(3))* will return either 0, 1 or 2. Random(A, B) can also be used to generate a random number between A and B.
And you compare the result and re-roll accordingly.
hi thanks for answer
is it possible to use a variable in the choose function.
Yes.
> value = choose(1,2,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20) > hi thanks for answer is it possible to use a variable in the choose function.
> value = choose(1,2,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20)
>
Would've been quicker just to try that in C2?
I think like it: