No choices inside if/elif statements?


#1

I have used the if/elif choice for two love interests.
There is a scene where the MC chooses an outfit for her date with the potential love interest she has chosen. (This is inside the coding of if/elif)
However an error appears and says that I can’t have labels or the ‘{’ ‘}’ signs inside an if/elif statement.
Is this true? And if yes, is there any other way I can do it?


#2

Hi, yes, you can’t have labels in if, elif statements, however you can use gotos :slight_smile:


#3

Can you clarify gotos? :smiley:


#4

You can use the gotos within the if, and elifs, and use these gotos to lead to the labels : )


#5

I’m really confused.
I do not have gotos within my if/elif statment.


#6

Ok, what are your labels?


#8

In my if/elif statment?

So when you choose your initial love interest the coding is:

YOU (think_rubchin)
(Who shall I choose?)

choice(DESICION)“I choose Ryan.”{

blablablabla

}
“I choose Felix.”{

blablablabla

}

Then in my next chapter it is:

if (DECISION is “I choose Ryan.”) {

This is where I want the MC to choose an outfit and it won’t let me.

}
elif (DECISION is “I choose Felix.”) {

blablabla

}

I hope I’ve done the coding correctly?


#9

label shopping_ryan
NARR
Entire scene with MC shopping with Ryan goes here.
Then at the end of this scene, write:
goto merge_story

label shopping_felix
NARR
Entire scene with MC shopping with Felix goes here.
Then at the end of the scene, write:
goto merge_story

label merge_story
NARR
You are now back to the main storyline!


#10

This part that you wrote :slight_smile:

label shopping_ryan
NARR
Entire scene with MC shopping with Ryan goes here.
Then at the end of this scene, write:
goto merge_story

label shopping_felix
NARR
Entire scene with MC shopping with Felix goes here.
Then at the end of the scene, write:
goto merge_story

label merge_story
NARR
You are now back to the main storyline!

When do I write it? Is is after the closing brackets like how you wrote it?


#11

Yes, you can write label shopping_ryan write below goto shopping_felix and the closing bracket (you could also add a @pause for 0 between them if you want, however it is not necessary.)


#12

So I’d have to do a whole scene where the MC goes shopping with them and choose her outfit then?


#13

Oh! I get it. So the scene that I’m trying to do now which is the MC in her bedroom choosing her outfit is basically the scene you’re showing me about the guys taking her to shopping?


#14

Hi, under label shopping_ryan, you would write up the scene for when MC (YOU) goes shopping with Ryan and chooses outfits. After you are done, write goto merge_story at the end.
Then under goto merge_story, write label shopping_felix, so under label shopping_felix would be the scene where MC (YOU) goes shopping with Felix and chooses outfits. After this, you write goto merge_story.
Under this goto merge_story, you would write label merge_story where your storyline becomes one.


#15

I did it!
It worked! Thank you so much :heart:


#16

I’m so sorry. I’m still having a bit of trouble.

Where exactly do I write ‘label merge_story’?
Do I write it at the end of absolutely everything?


#17

Cos that is what I did. But the problem is, by doing that I am now out of the if/elif statement which means I do not know which love interest my readers chose and therefore cannot write any further.


#18

If you’re worried, you can write, something like:

Hi, pretty sure choices carry over and can be remembered more than once!
However, you could always write a gain within those labels : )
And yes, label merge_story would go at the end.


#19

I feel so bad you are helping me but I’m not understanding. I’m sorry!
What does the gain do?


#20

This is my current script

label date_ryan

YOU (think_rubchin)
(What should I wear?)

choice"Black&Red"{

@YOU is dustoff_neutral_loop
@YOU changes into YOUDATE1
@YOU is idle
@pause for a beat

}
“Blue&Gold”{

@YOU is dustoff_neutral_loop
@YOU changes into YOUDATE2
@YOU is idle
@pause for a beat

}
“Purple&Silver”{

@YOU is dustoff_neutral_loop
@YOU changes into YOUDATE3
@YOU is idle
@pause for a beat

}

YOU (think_rubchin)
(Is this the outfit I want?)

choice"Yes!"{

@YOU walks to spot 1.118 -150 125 and YOU faces left

goto merge_story

}
“No.”{

goto date_ryan

}

label date_felix

YOU (think_rubchin)
(What should I wear?)

choice"Black&Red"{

@YOU is dustoff_neutral_loop
@YOU changes into YOUDATE1
@YOU is idle
@pause for a beat

}
“Blue&Gold”{

@YOU is dustoff_neutral_loop
@YOU changes into YOUDATE2
@YOU is idle
@pause for a beat

}
“Purple&Silver”{

@YOU is dustoff_neutral_loop
@YOU changes into YOUDATE3
@YOU is idle
@pause for a beat

}

YOU (think_rubchin)
(Is this the outfit I want?)

choice"Yes!"{

@YOU walks to spot 1.118 -150 125 and YOU faces left

goto merge_story

}
“No.”{

goto date_felix

}

label merge_story

(After this it’s a different scene)


#21

If you write:
label merge_story
NARR
Back to main storyline.

Then later on, you could use the gains- gain ryan_love and gain felix_love to remember those choices.

if ( ryan_love ) {
[scene for MC and Ryan Romance goes here]

} elif ( felix_love ) {
[scene for MC and Felix Romance goes here]

} else {
[scene for bla bla bla goes here]
}