How do I create rarity in a random prize generator?

Get help using Construct 2

Post » Fri May 16, 2014 1:36 am

I want to create a button that gives a random prize when clicked. Some items should be super common to get (like 20% of the time that is what you get. And some items should be super rare (like only 0.1% chance to get the item).
B
10
S
2
Posts: 30
Reputation: 722

Post » Fri May 16, 2014 3:22 am

I would assign numbers to each "prize". Like say, if you want one prize to have a 20% chance, assign it numbers 1-20. If a prize has a 10% chance, assign it numbers 1-10. Then have a random number generator pick a number, in this example between 1 and 100. Check to see which prize contains that number.
Kurieus
Come visit and play Blast Box!
B
15
S
3
Posts: 205
Reputation: 1,349


Return to How do I....?

Who is online

Users browsing this forum: marc254 and 5 guests