Limited chances to choose the correct answer

In my story, I’m planning a little minigame in which the reader has the opportunity to choose between several options, only two of which are “correct” and will help them in the story. I wanted them to have three chances to choose the two correct options; I don’t want them to loop back to the choice if they choose an incorrect one, rather if they choose the incorrect one it just moves on and they have one less chance to pick the right ones. Does anyone know how to code something like that? I tried doing it myself but it got too complicated and I didn’t want my errors to completely mess it up lol.

thanks!

3 Likes

Hi, I had this problem but I went the complicated way and did the choice with the three and then loads of choices inside choices and went the really complicated way and it is so easy to mess up but if you do it one by one then you’ll be fine. Sorry but I can’t think of any other way xx

Hmm… Maybe this?

label minigame
choice
“(correct) choice 1” {
gain correct
} “(correct) choice 2”{
gain correct
} “choice 3” {
@WRONG +1
} “choice 4” {
@WRONG +1
} “choice 5” {
@WRONG +1
} “choice 6” {
@WRONG +1
} “choice 7” {
@WRONG +1
}

if (correct) {
goto finish_minigame
} else {
goto wrong
}

label wrong

if (WRONG > 3){
NARRATOR
You are wrong, try again.
goto minigame

} elif (WRONG = 3) {
NARRATOR
You do not have anymore tries.
goto finish_minigame
}

label finish_minigame

code afterword here

I made this at the top of my head, feel free dm me if there’s any issues!

that seems like it could work, i’ll try it out!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.