Help with images in slot machine game
I'm developing a slot machine game that is working pretty well but am battling with showing different bars as a winner.
Roll(0) is the first image in the top row (3) the next and (6) the last in a row of three. Roll(0).Tag = 5 indicate triple bar picture with index = 5 in imagelist1
Roll(0).Tag = 6 will be double bars and Roll(0).Tag = 7 single bars.
Using the following to select 3 bars in top row
'===3 Triple Bars - multiply by 120
If Roll(0).Tag = 5 And Roll(3).Tag = 5 And Roll(6).Tag = 5 Then
credits = BetCount(1).Caption * 120
lblCredits.Caption = lblCredits.Caption + credits
Exit Sub
End If
my problem is to indicate the row as a winner with a mix of triple bar, double bar and single bar. Can experts please help? Don't know if this explains it well enough. I am at [email protected] (that is in South Africa)
The machine has got three winning rows rows so it makes for endless options to specify. Something like
If Roll(0).Tag = 5 And Roll(3).Tag = 5 And Roll(6).Tag = 6 Then
credits = BetCount(1).Caption * 120
If Roll(0).Tag = 5 And Roll(3).Tag = 5 And Roll(6).Tag = 7 Then
credits = BetCount(1).Caption * 120
If Roll(0).Tag = 5 And Roll(3).Tag = 6 And Roll(6).Tag = 7 Then
credits = BetCount(1).Caption * 120
If Roll(0).Tag = 6 And Roll(3).Tag = 5 And Roll(6).Tag = 5 Then
credits = BetCount(1).Caption * 120
and on and on to specify all combinations of the three indexes
Re: Help with images in slot machine game
Make a function that checks rows to see if they have been won. The function will need to take in three " Roll's " and you need to use the function everytime you check a winline.
If you don't understand, ask and I will spoon feed you some code to help you but don't expect me to do it for you! ;)