Hi there. You'd probably want a function that checks all 8 for input every time rather than having "set" combinations. This allows you the flexibility to include any combination you want in future. The Function could be called with 8 parameters which map to your button combination, such as "10001000" in the example below:
Variable "FailState" = 0
## You need a variable to judge whether or not the player has failed to do the correct combination. Any of the combination checks can register a fail which then gets passed to the next function which allocates points.
"Combination" on collision with "JudgementRow"
Run Once
Call function "Judgement" (1,0,0,0,1,0,0,0)
Function "Judgement"
param0 = 1
param1 = 0
param2 = 0
param3 = 0
param4 = 1
param5 = 0
param6 = 0
param7 = 0
{
set "FailState" to 0 ## Resetting the variable so the player doesn't inherit the result from last time.
if function.param(0) = 1
if button1 is NOT pressed
set "FailState" to 1 ## The player has failed the combination.
if function.param(1) = 1
if button2 is NOT pressed
set "FailState" to 1 ## The player has failed the combination.
if function.param(2) = 1
if button3 is NOT pressed
set "FailState" to 1 ## The player has failed the combination.
if function.param(3) = 1
if button4 is NOT pressed
set "FailState" to 1 ## The player has failed the combination.
if function.param(4) = 1
if button5 is NOT pressed
set "FailState" to 1 ## The player has failed the combination.
if function.param(5) = 1
if button6 is NOT pressed
set "FailState" to 1 ## The player has failed the combination.
if function.param(6) = 1
if button7 is NOT pressed
set "FailState" to 1 ## The player has failed the combination.
if function.param(7) = 1
if button8 is NOT pressed
set "FailState" to 1 ## The player has failed the combination.
Call Function Points(FailState) # Passing Failstate to the Points function, which can be used to either subtract or remove points based on your gameplay logic.
}
If you wanted to improve this, you might consider the following:
1) The player has failed the combination completely (all three buttons missed) - they get 0 points.
2) The player has failed the combination by missing one of the three buttons - they should get SOME points.
3) The player has passed the combination - they should get all the points.
If you changed the variable above to "add +1" (instead of "set to 1") for each incorrect check then pass that number to the "Points", you can judge the degree of their success and failure.