here is the code:
verb
Create_Character()
alert("We will now roll the dice!","New Character")
var/r1 = roll(1,6)
var/r2 = roll(1,6)
var/r3 = roll(1,6)
var/r4 = roll(1,6)
var/roll_1 = (r1+r2+r3+r4)-min(r1,r2,r3,r4)
var/r1a = roll(1,6)
var/r2a = roll(1,6)
var/r3a = roll(1,6)
var/r4a = roll(1,6)
var/roll_2 = (r1a+r2a+r3a+r4a)-min(r1a,r2a,r3a,r4a)
var/r1b = roll(1,6)
var/r2b = roll(1,6)
var/r3b = roll(1,6)
var/r4b = roll(1,6)
var/roll_3 = (r1b+r2b+r3b+r4b)-min(r1b,r2b,r3b,r4b)
var/r1c = roll(1,6)
var/r2c = roll(1,6)
var/r3c = roll(1,6)
var/r4c = roll(1,6)
var/roll_4 = (r1c+r2c+r3c+r4c)-min(r1c,r2c,r3c,r4c)
var/r1d = roll(1,6)
var/r2d = roll(1,6)
var/r3d = roll(1,6)
var/r4d = roll(1,6)
var/roll_5 = (r1d+r2d+r3d+r4d)-min(r1d,r2d,r3d,r4d)
var/r1e = roll(1,6)
var/r2e = roll(1,6)
var/r3e = roll(1,6)
var/r4e = roll(1,6)
var/roll_6 = (r1e+r2e+r3e+r4e)-min(r1e,r2e,r3e,r4e)
var/list/L = new()
L += roll_6
L += roll_5
L += roll_4
L += roll_3
L += roll_2
L += roll_1
var/choice1 = input(usr,"What roll do you want for strength?","New Character",null) in L
L -= choice1
it pops up a different number of vars each time. need help i think this is because it is "rolling" which vars get displayed
ID:266322
Dec 23 2001, 5:30 pm
|
|
Air _King wrote:
it pops up a different number of vars each time. need help i think this is because it is "rolling" which vars get displayed Look up roll(), its more or less like rand() in a more dice-friendly syntax. It outputs different vars each time, because its rolling a number between 1-6 on each of the rolls and that is random Alathon |
In response to Alathon
|
|
Alathon wrote:
Air _King wrote: I think I said that wrong, so here it pops up different numbers of random vars, like one time it might pop up six and another 3, but there are three vars each are all random. I want the vars to still be random, but I want 6 to show up. Thanks for your time, <font color=darkblue>A<font color=blue>I<font color=3399FF>R <font color=00FFCC>_<font color=00FFFF>K<font color=0099FF>I<font color=blue>N<font color=darkblue>G</font></font></ font></font></font></font></ font></font> |
<snip>
I'm not too sure on why it's doing that, but if I had to guess, I'd say that you were setting the variables to the roll(), not the variables to the number.
Anyway, a suggestion: Don't do it with boxes. They irritate me to no end. Use the browser. Browser character creation==31337.
-- Tarmas.