Help with locked choices

Hello. I was wondering if anyone could help me with locked choices? Even though it is locked, I would like to them to be able to choose the other option. Is it possible to label inside IF/ELIF

How do you lock choices?

Hope this helps. :two_hearts:

Go watch on youtube of joseph evans!
He helped me a lot! :slight_smile:

1 Like

@JemU776 could probably help you with this :slight_smile:

1 Like

Hi sure, I can help you :+1:

No, it’s not possible to put a label inside of if/elif/else, you will need to put a goto in there that leads to a label outside.

Example using gains:

if (premium1) {
goto prem_1
} elif (premium2) {
goto prem_2
} else {
goto prem_3
}

label prem_1
#premium1 script goes here
goto merge_story

label prem_2
#premium3 script goes here
goto merge_story

label prem_3
#else script goes here
goto merge_story

label merge_story
#now u are back to the main story line.

1 Like

A locked choice example using 2 options:

NARR
What’s your fav ice cream flavor?

choice
“Mint”{

gain mint

}“Mango”{

gain mango

}

#bla bla bla, later on in the script.

YOU
I’d like ice cream.

MOM
Which flavor would you like?

if (mint){

goto mint_path

}else{

goto mango_path

}

label mint_path

YOU
I’d like…

choice
“Mint”{

YOU
Mint ice cream.

}< LOCKED>“Mango”{

NARR
This choice is locked since you picked mint ice cream flavor before!

goto mint_path

}

goto merge_story

label mango_path

YOU
I’d like…

choice
“Mango”{

YOU
Mango ice cream.

}< LOCKED>“Mint”{

NARR
This choice is locked since you picked mango ice cream flavor before!

goto mango_path

}

goto merge_story

label merge_story
#story line merges

I also have a different kind of example here: JemU776's Help Thread using character points. The Points system: The Points System
Past choices - Using if/elif/else to Remember Past Choices Color code and lock choices - HOW TO: Color Code and Lock A Choice

2 Likes

You’re an angel thank you so much this is very helpful

Thanks :wink:

If you need to test out other paths, remember to reset your gains (which are also called flags as well):

1 Like

Thank you so much

No problem :blush:

I think I understand it. So I can also use this for I want the choice to loop itself, so that they can pick the other one

Yep, basically if they picked mint ice cream, later on, they choose from mango and mint. Since they didn’t pick mango before, when they try to pick it, it’ll say something like this:

NARR
You can’t select this option!

Then right under this, there’ll be a goto that leads to a label back to asking this question since they can’t get past this point, so it’s on loop.

And yep, if you want an option in a choice to loop itself, it’d look something like this:

label loop

NARR
Pick 1.

choice
“A”{
NARR
You picked A
}< LOCKED >“B”{
NARR
You can’t go past this.
goto loop
}
#continue story here

Thank you so much!

1 Like

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