ID:1277169
 
(See the best response by Eternal_Memories.)
I want to implement a method into my game that at character creation the player is randomly assigned 1 of 4 traits, that would be stored in a var.

I was thinking of using "prob" to implement this, with a 25% chance on each trait.

I'm just a little unsure on how to structure the code. I'm fine at programming C++ but the DM language is giving me a bit of trouble.

Thanks for any help you can give.
Best response
var/Random = pick("Option 1", "Option 2", "Option 3", "Option 4")


?
Ahh, thank you. I wasn't aware of the "pick" procedure. I just looked it up in the reference, and it seems that would work perfectly.

Say I wanted to give the character a 10% chance of being created with a bonus, I would then use prob(), correct?
Yeah just the syntax and organization, I'm not quite used to it. I'm used to sticking something in a header file, defining it there, and the being able to call it in a main .cpp file.

But it seems that DM doesn't use a main file, its moreso, a bunch of different arguments and procedures in their own files. So I'm just having trouble connecting them in my head, more or less. Just Syntax issues, I'm sure I'll get through it.

I appreciate the help partner.
Thanks mate, not releasing it or any real info until I have everything working right and the game looking good.