Scripting related questions..
#4

Random(x) generates numbers between 0 and X-1, including them both. So your possible cases are X, statistically speaking, if you want an 1/10 chance, all you need to do is
Код:
new chance = random(10);
if(chance == 0) //it could be any number, but meh
{
       blablabla
}
EDIT: Generated numbers by this algorithm are {0,1,2,3,4,5,6,7,8,9}
Reply


Messages In This Thread
Scripting related questions.. - by Dokins - 17.03.2014, 08:03
Re: Scripting related questions.. - by Calabresi - 17.03.2014, 08:16
Re: Scripting related questions.. - by Dokins - 17.03.2014, 08:29
Re: Scripting related questions.. - by Raisingz - 17.03.2014, 08:41
Re: Scripting related questions.. - by Calabresi - 17.03.2014, 08:43
Re: Scripting related questions.. - by Dokins - 17.03.2014, 08:43
Re: Scripting related questions.. - by Calabresi - 17.03.2014, 08:46
Re: Scripting related questions.. - by Dokins - 17.03.2014, 08:49
Re: Scripting related questions.. - by Dokins - 17.03.2014, 08:54
Re: Scripting related questions.. - by Calabresi - 17.03.2014, 09:00

Forum Jump:


Users browsing this thread: 1 Guest(s)