The Daily Click ::. Forums ::. Klik Coding Help ::. Increase chances of item
 

Post Reply  Post Oekaki 
 

Posted By Message

Kritter5x



Registered
  18/04/2010
Points
  1
12th December, 2013 at 12/12/2013 03:17:03 -

I'm trying to make a capsule machine similar to the trophies in Smash Bros: Melee where the more coins you pay, the better the chance you'll get a trophy that you don't already have.

So basically it'll be like:

You own:
Trophy 1
Trophy 2
Trophy 3

You want:
Trophy 4

And if you insert one coin, you have a 25% chance of getting Trophy 4, however if you insert 2 coins you have a 50% chance and so on. But i've no idea how to make this happen, any help would be greatly appreciated.

Thanks.

 
n/a

Rick Cameron



Registered
  11/03/2012 08:45:25
Points
  82
13th December, 2013 at 13/12/2013 06:15:51 -

Perhaps have each coin increase the number of random sweeps through the trophy list?

1 coin = Random Trophy selected
2 coins = 2 random trophies selected, keep the one you don't have (Flag trophies you own to ON, and not to OFF)
3 coins = 4 random trophies selected, etc etc

Now I haven't done the maths, but depending on how many in total you have, play with the ratios and things.

But basically, pick a random, and the more coins you have the more rolls at random you get. You then tell the program to keep the UNFLAGGED option.

Hope that helped. I am dubious though. Someone with more knowledge and a greater inclination to do the maths will no doubt trump me.



 
n/a
   

Post Reply



 



Advertisement

Worth A Click