random
#2

I assume you want something like this, correct me if I'm wrong.

Код:
new firstrand = random(3)+1, secondrand;
if(firstrand == 1 || firstrand == 2) // 5, 6, 7, 8, 9 have 2/3 chances to come. ( 66.66% chances )
{
       secondrand = random(5)+5; // 5, 6, 7, 8, 9
}
else if(firstrand == 3) // 1, 2, 3, 4 have only 1/3 chances to come ( 33.33% chances )
{
       secondrand = random(4)+1; // 1, 2, 3, 4
}
Reply


Messages In This Thread
random - by CSCripMa - 04.02.2016, 10:02
Re: random - by Lucky13 - 04.02.2016, 10:12

Forum Jump:


Users browsing this thread: 1 Guest(s)