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.