Advance Choices

Hello, I need help. Been studying the “All Directing Commands”, checking out forums but still can’t find a solution. This is my first story and I’ve come to the complex coding part. I’m already familiar with simple codings and directings…

Here’s my detail:
#1 Choices with 2 options
#2 Merge Branch (similar regardless if option 1 or 2 is chosen)
#3 Outcome of Option 1 (PS: To use labels or flags or?)
#4 Outcome of Option 2 (PS: To use labels or flags or?)
#5 Merge Branch (similar regardless if option 1 or 2 is chosen)

My questions:

  1. How to merge the branch for #2 and #5?
  2. As for #3 & #4 (I tried duplicating and insert #2 into #3 and #4) then use the goto and label but it doesn’t work. If my label is without brackets, the story will just flow from #1 all the way to #5. If I put brackets in the label, there’ll be errors like “Your label may not contain space” or " Unexpected BLOCK_BEGIN:{"

Kindly advice which type of directing to use and guide accordingly. Thank you in advance! :slight_smile:

If I understand correctly what you need, there are two ways to do so

with gains

choice “option1” {
gain option1
#Here what happens for option 1
} “option2” {
gain option2
#Here what happens for option 2
}

#here what happens whatever choice you picked

if (option1) {
#here what happens if chose option 1
} elif (option2) {
#here what happens if chose option 2
}

#here what happens after, whatever choice you picked

naming the choice

choice (which_option) “option1” {
#Here what happens for option 1
} “option2” {
#Here what happens for option 2
}

#here what happens whatever choice you picked

if (which_option is “option1”) {
#here what happens if chose option 1
} elif (which_option is “option2”) {
#here what happens if chose option 2
}

#here what happens after, whatever choice you picked

After some time trying, it works. Thanks… You’ve made my day!

Here’s my feedback… I tried with gains. The option 1 path is correct but the option 2 path is still option 1’s path. (The gain is correctly typed and bracket correctly placed). As for named choices, it works perfectly. Thanks again!

1 Like

If you preview on the app, you need to reset the story progress because it remembers past gains

I preview it in the website using laptop…

That’s weird :thinking:

Check your flags, and make sure that option 1 is unselected.

Summary

Gold = selected. Blue = unselected.
image
image
image
image

That’s okay :slight_smile:
I can use the alternative.

1 Like

Will try. Thanks :slight_smile:

Did it work?

Yeah it worked. Thank you…

Hello, I have another question. Can I insert simple gem choices in #3 and #4?
Because I got an error: Unexpected block end. The system failed to match the } for my earlier {

So you’re missing a }. Did you find it?

Gem Choice
choice (choiceName)
< GEMS > “Gem Choice” {
} “Normal Choice” {
}

Found it. The outcome for named choice option 1 starts at 732, where i place the { and ends at 1161 with }. In between that there are multiple scenes and another two simple choices inside.
Before I add in the two simple choices, everything was fine. Is it because there’s too many choices inside the named choice?

After some fixing, everything is good to go now. Thanks for your assistance.

Nope. I’m not sure if there’s a limit. But it’s just because you were missing a }, assuming it works with the same amount of choices in the named choice.

you probably accidently deleted some bracket…you always have to have the same ammount of opening and closing brackets.

Thanks.

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