Maybe I misunderstand the question, because I'm thinking of something along completely different lines.
You didn't fully explain your mechanic. If the correct answer is random, and the player has to get 3 random correct answers in order to progress, then it's going to be nearly impossible to do. The player would have one chance in 64 of guessing it correctly. So I would rethink your strategy on this one.
I will assume you will let the player use the one slot machine over and over until they get the right answer, then that slot machine becomes inactive. And once the slot machines are all correct, the "puzzle" is over and the player can leave the room somehow. And that this whole puzzle will only happen once.
Put these event commands onto the first slot machine
Code:
Control Variables: Random = Random number between 1 and 4
Show Choices [A] [B] [C] [D]
When [A]
If Variable Random = 1
Control Variables: Slot Success += 1
Control Self Switch A = ON
End
When [B]
If Variable Random = 2
Control Variables: Slot Success += 1
Control Self Switch A = ON
End
When [C]
If Variable Random = 3
Control Variables: Slot Success += 1
Control Self Switch A = ON
End
When [D]
If Variable Random = 4
Control Variables: Slot Success += 1
Control Self Switch A = ON
End
Branch End
Then add a second event page conditioned by self switch A, that does nothing.
Do exactly the same to the other two slot machines - same variables, same self switches.
Finally, have your "exit" or "win" event conditioned by Variable: Slot Success being greater than or equal to 3.
So what will happen is that the player will interact with slot machine 1 and guess an answer. If they guess incorrectly, they can try again, and again, until they get the correct answer. When that happens, the Slot Success variable will increase, and the slot machine will become inactive. They do the same thing with the other two slot machines. By the time they guess all 3 correctly, all machines will be inactive, the variable will be set to 3, and the "exit" event will be activated.
If you want to be able to repeat this each time you enter that room, then create one more event with a parallel process trigger, and the following event commands:
Code:
Control Variables: Slot Success = 0
Script: $gameSelfSwitches.setValue([map, event, 'A'], false);
Script: $gameSelfSwitches.setValue([map, event, 'A'], false);
Script: $gameSelfSwitches.setValue([map, event, 'A'], false);
Erase Event
and on the script lines, replace
map with the map id with no leading zeros (so map 015 will be just 15), and replace
event with the id of your three slot machine events, again with no leading zeros (this is the event NUMBER, not its NAME).