Macronair / TheMillionaireGame

A custom game controller software based on the tv game show Who Wants to be a Millionaire!
37 stars 8 forks source link

Double Dip's final answer music cue persists if the player's first guess is correct [solution within] #21

Closed MuchMoreMatt closed 11 months ago

MuchMoreMatt commented 2 years ago

If the player used the Double Dip lifeline and guessed the correct answer on the first attempt, then Double Dip's final answer music cue will play for every final answer thereafter. Currently, the code looks like this:

Public Shared Sub FinalAnswer()
        Dim stopmusic1 As Thread = New Thread(AddressOf StopCue1)
        stopmusic1.Start()
        If chance = 2 Then
            dd_Final.URL = Application.StartupPath + "\Sounds\doubledip_final1.mp3"
        ElseIf chance = 1 Then
            dd_Final.URL = Application.StartupPath + "\Sounds\doubledip_final2.mp3"
            active = False
        End If
        dd_Final.controls.play()
    End Sub

A simple fix is to add another "if/then" within this subroutine that checks if the player guessed correctly, then deactivate the lifeline. Here is the code that does that:

If HostScreen.pnlAnswer.BackColor = Color.Lime Then
            active = False
End If
Macronair commented 2 years ago

Thanks for the very usefull tip! I will look into it. ;)

Macronair commented 11 months ago

This must be fixed in the new version (1.1) that is available now.