Riddle

Hello, I could use some help basically I'm make a puzzle where an NPC ask question six riddles if they get at least three they will be allowed to pass. the issue is that I don't know how to make the game know if the player got enough riddles right or not. I think it might involve variables and increasing them but I don't know how to do that.
Right. Have a variable called "Riddles Correct", and a variable called "Riddles Answered". When the player answers a riddle correctly, increase both of them by 1 (use "Control Variables" event command to do this). When the players answers incorrectly, increase only the Answered variable by 1.

When the Riddles Correct variable is at least 3, the NPC lets you pass (you can use a "Conditional Branch" event command to check whether Riddles Correct is >= 3).

If the Riddles Answered is 6 and the Riddles Correct is less than 3 (put one Conditional Branch inside the other), you know that they player failed. The NPC might say "You didn't get enough right, I won't move!" If you want to give the player another chance to answer all 6 riddles again, you can set both variables back to 0 ("Control Variables": Set equal to 0) and then ask the riddles again.
Right. Have a variable called "Riddles Correct", and a variable called "Riddles Answered". When the player answers a riddle correctly, increase both of them by 1 (use "Control Variables" event command to do this). When the players answers incorrectly, increase only the Answered variable by 1.

When the Riddles Correct variable is at least 3, the NPC lets you pass (you can use a "Conditional Branch" event command to check whether Riddles Correct is >= 3).

If the Riddles Answered is 6 and the Riddles Correct is less than 3 (put one Conditional Branch inside the other), you know that they player failed. The NPC might say "You didn't get enough right, I won't move!" If you want to give the player another chance to answer all 6 riddles again, you can set both variables back to 0 ("Control Variables": Set equal to 0) and then ask the riddles again.

It worked thank you!

Original thread: https://forums.rpgmakerweb.com/threads/riddle.121959/