Forum Community for RPG Maker MV. Custom made badass slot machine is almost ready. Uses 6 icons, 5 slots, prizes for 3x, 4x and 5x.
Submitted by3 decades agó
Só I possess a software that I'meters writing and one crucial element of which is usually a percent chance of something occurring. I've attempted three various tips and none of them are usually accurate sufficiently. Hoping somebody else offers a better idea.
The percentage chance of the custom made method proc'ing can be manually fixed. To test this, I set it to 5 aiming for a 5% possibility that with every step the personality takes a specific technique will fire place. I've used actions and can ensure without a doubt that the opportunity 'roll', therefore to talk, is only renewed once every step. In some other terms, when I get a phase the possibility check only happens as soon as making sure that it doesn't just spam a bunch of arbitrary figures while evaluating leading to the inaccuracy.
Set up #1 Merely making use of rand(101) and comparing that outcome to my cónstant and if thé rand result is equivalent to or much less than my constant, method fire.
Established up #2 Declared an selection and set the dimension equivalent to the proportion chance therefore having the illustration above an assortment with 5 components. Each of those elements have a arbitrarily picked quantity between 1-100 and the rand(101) move check will be likened to the array and if the roll check matches any component of the array, technique proc'h.
Fixed up #3 Exact same as set up #2 except that with each action the quantities saved in the number are automatically removed and selected at random once again giving the numbers saved in the range completely brand-new random beliefs on each action.
It seems that all thrée of these strategies procure a significantly higher achievement rate of 5%. On normal I'chemical state it't even more about 30-40%. Are I really simply that unfortunate to become that fortunate or will anyone have got any suggestions on how to precisely get a random percentage possibility this way?
Edit: l've uploaded a movie to show what I'meters talking abóut: https://www.youtubé.com/wátch?v=6nek1lahGKQamp;feature=youtu.be
11 comments