Adding to /list with prob() in Developer Help
|
|
Is there an internal way to add something to a list with a preset probability for use in pick()? I need to be able to add things to a list with a certain probability as I loop through them, and then have it pick one. I can code something for it myself if there isn't already something internal for it, I'm just wondering... ex:
world<<pick(prob(10);"10",prob(20);"20")
var/list/L=list() for(var/v=10 to 20 step 10) L.Add(prob(v);"[v]") world<<pick(L)
|
|