Sorry I am messaging from my phone so I can't do screenshots.
I am using the action-
Set Instance Variable To = choose 1,2,3
In order to return a random number, 1, 2 or 3.
However if I would like the number 2 to come up more often, could I write it as-
But what if I want to make it like 99% chance to hit 0 and 1% to hit 1? Do I have to write 0 for 99 times or is there a better way?
Develop games in your browser. Powerful, performant & highly capable.
Yes Daniel, that would happen. And that's a good question...
Then you do int(random(100)), and check if the value is 0. If not then treat it as 1.
danielbishop56 remus B
How I'd do it for probability with chance:
Update: Showing probability draw difference from infinite sample and definite sample
For infinite sample, the result may vary because the sample is infinite.
For definite sample of 100, no matter how many time you draw 100, you'll get A=10, B=30, C=40