Define 4 variables, such as:
- NumCorrect: (Number) Records the number of correctly-answered questions.
- AnsweredA: (Boolean) Records whether the player has answered NPC A's question.
- AnsweredB: (Boolean) Records whether the player has answered NPC B's question.
- AnsweredC: (Boolean) Records whether the player has answered NPC C's question.
Write a conversation for each NPC. In NPC A's conversation, check AnsweredA. If it's true, tell the player that the question is already answered. Otherwise ask the question. If the player answers correctly:
1. Set AnsweredA to true.
2. Add 1 to NumCorrect.
3. If NumCorrect >= 3, open the door.
Here is a complete working example:
ThreeRiddlesExample_2019-01-07.unitypackage