ralphmerridew wrote:How often will you be doing stuff like that?
The direct way would be:
Set die1 to %RAND(1,6)%
Set die2 to %RAND(1,6)%
Set die3 to %RAND(1,6)%
Set numhigh to %IF(%die1% > 3, 1, 0) + IF(%die2% > 3, 1, 0) + IF(%die3% > 3, 1, 0)%
Set pointgain to %IF(%numhigh% > 0, 1, 0)%
Increase othervariable by %pointgain%.
(It's possible to combine some of those into a single expression.)
Thanks but I don't get it, this is my first 'programming' experience with functions and expressions. The 'dice' variables are text Arrays, so when I try to set them to %RAND(1,6)% there's a blank box to introduce a value or another variable before the = and I don't really know what to do. That's what I see:
Set - dice1 - [(blank)] = RAND(1,6) -- and I cannot even press OK if I don't introduce an 'own value' or select another variable in that blank text box
ice_wanted wrote:Put the result of %dice[rand(1,6)]% in a variable?
Yeah, but I don't know how to do the math. My idea was: you roll the dice, you get (and see) a random result, this result is stored somewhere. But I guess it's not as easy as it seemed at first - for me at least