ID:178176
 
Okay, Lets say there are six commands, and the computer makes one of them happen at random, but you want one to happen more than the others: 1=Common 2=Not-so-common
Command1:1
Commands2-6:2
Ok like that, should I use rand() or prob()? I do not know much about prob() so could you give me a little snippet of it?
FireEmblem wrote:
Okay, Lets say there are six commands, and the computer makes one of them happen at random, but you want one to happen more than the others: 1=Common 2=Not-so-common
Command1:1
Commands2-6:2
Ok like that, should I use rand() or prob()? I do not know much about prob() so could you give me a little snippet of it?

It seems to me you'd be better off using my pickweight() proc. The proc is listed in my first BYONDscape article, "Learn To Love Associative Lists"; it's available in the archives.

Lummox JR
In response to Lummox JR
I don't have BYONDscape. =(
In response to FireEmblem
FireEmblem wrote:
I don't have BYONDscape. =(

It's a free article; you don't need a subscription to access it.

Lummox JR
In response to Lummox JR
Your BYONDscape thing was confusing,