Greets all. I've been with BYOND for just under a year and have made a few games that were never good enough to put up on the hub just to get familiar with the language. As of a week ago, I'm working on a real project -- A pretty basic textMUD (and a side project as a moderatly complicated strategy game).
But enough about the stuff you don't care about...
I've already coded a 1D100 dice roll, which was easy enough to do, but I'm stumped on how to go about letting the player choose how many, and what kind of dice to roll.
eg. A player inputs 2,6. Two six sided dice get rolled.
If you know how to do this (and I know alot of you do, heh) please post. I'll be gone for awhile though, I'm meeting up with some friends.
Thanks for your time. :)
ID:177728
Aug 4 2002, 3:08 pm
|
|
Look up the roll proc, and heres an example:
mob/verb/diceroll(n1 as num,n2 as num)
var/num
num = roll("[n1]d[n2]")
world << num