I am writing a slot machine game... Really good looking BUT having some problems with sorting out how to figure the wins.
I have a wheel mesh with 10 pictures on it spaced... Matty helped me roll that thing and it now stops on whatever the random number says it should. It is beautiful.
It creates 4 random numbers from 0 - 9 and stops the wheel on whatever number it is supposed to.
This part all works.
Now the problem...
I put three cherries on the wheel at position 1,5,8
I put two $ signs on the wheel at position 3,7
I put one star on the wheel at position 2
I put one BAR on the wheel at position 4
I put one WILDcard on the wheel at pos. 6
I put a DOUBLEbar on the wheel at pos. 9
and
I put a LEMON on the bar at position 0
Minimum win is TWO objects and a WILDcard.
Two cherries and a wildcard wins 1X bet.
BUT since cherries are at three different positions??? How can I account that on 4 wheels... WHERE the 4th wheel could be anything else?
I thought of this:
1. Making EACH object have a distinct point value. Ie:
Cherreies=1, $signs = 7, BAR = 16 etc...
Then I could just add up the points and do that with math...
BUT
If you can get 2 cherries and a wildcard AND there is another wheel what would the totals be?
CHERRY LEMON CHERRY WILDCARD
LEMON CHERRY CHERRY WILDCARD
CHERRY WILDCARD WILDCARD CHERRY
So I thought this:
2. Recursively testing from the top down... IF 4 lemons = JACKPOT call a test for that first... then 3 lemons and a wildcard... then three lemons and ANYTHING... Then two lemons and a wildcard and anything......
But how do I account for "ANYTHING"?
-RZ
I have a wheel mesh with 10 pictures on it spaced... Matty helped me roll that thing and it now stops on whatever the random number says it should. It is beautiful.
It creates 4 random numbers from 0 - 9 and stops the wheel on whatever number it is supposed to.
This part all works.
Now the problem...
I put three cherries on the wheel at position 1,5,8
I put two $ signs on the wheel at position 3,7
I put one star on the wheel at position 2
I put one BAR on the wheel at position 4
I put one WILDcard on the wheel at pos. 6
I put a DOUBLEbar on the wheel at pos. 9
and
I put a LEMON on the bar at position 0
Minimum win is TWO objects and a WILDcard.
Two cherries and a wildcard wins 1X bet.
BUT since cherries are at three different positions??? How can I account that on 4 wheels... WHERE the 4th wheel could be anything else?
I thought of this:
1. Making EACH object have a distinct point value. Ie:
Cherreies=1, $signs = 7, BAR = 16 etc...
Then I could just add up the points and do that with math...
BUT
If you can get 2 cherries and a wildcard AND there is another wheel what would the totals be?
CHERRY LEMON CHERRY WILDCARD
LEMON CHERRY CHERRY WILDCARD
CHERRY WILDCARD WILDCARD CHERRY
So I thought this:
2. Recursively testing from the top down... IF 4 lemons = JACKPOT call a test for that first... then 3 lemons and a wildcard... then three lemons and ANYTHING... Then two lemons and a wildcard and anything......
But how do I account for "ANYTHING"?
-RZ