Coding Help! (if/elif)

So I’m coding a scene where my two characters are at the mall picking out dresses. After one decides which color dress she wants, I want to have my other character give her a compliment based on the dress she picked. I plugged in my if/elif code and for some reason when I preview the game it won’t remember my choice. Am I doing something wrong here?

if(chose_annie_gold){

&YOUNG ANNIE is laugh_giggle
YOUNG DANA (flirt_wink_happy)
You make 24 carat gold look like a joke

}elif (chose_annie_black){

&YOUNG ANNIE is laugh_giggle
YOUNG DANA (flirt_wink_happy)
Girl, you look like you’re clothed in mystery
And that’s one riddle Max is gonna wanna crack

}
elif (chose_annie_pink){

&YOUNG ANNIE is laugh_giggle
YOUNG DANA (flirt_wink_happy)
Max will have his eyes fixed on you aaaaall night
}

What did you write as your gain? For example

“Red” {
gain chose-red
}
Blue {
gain chose-blue
}

if (chose-red) {
Insert what happens
}
Elif (chose-blue) {
Insert what happens
}

Isn’t it ‘choice’ instead of ‘chose’? Or am I mistaken?

It depends on what the gain id the brackets have to contain the exact words the reader chose as their gain. She could have just put
gain Red and then all she would have to put is

if (Red) {
Insert scene
}

show us the dress choice coding please

Correct me if I’m wrong, but shouldn’t the command be:
if (choice_label is “Choice 1”){
} elif (choice_label is “Choice 2”){
} else {
}

this doesnt look right unled you would name your choice “choice_label”

If you use for remembering naming choice it looks like this

    CHARACTER (animation)
What do I want to wear?

choice (NAMEOFCHOICE)
“DRESS1” {
} “DRESS2” {
} “DRESS3” {
}

if (NAMEOFCHOICE is “DRESS1”) {
} elif (NAMEOFCHOICE is “DRESS2”) {
} else {
}

But if you use gains it looks like this:

CHARACTER (animation)
What do I want to wear?

choice
“DRESS1” {
gain D1
} “DRESS2” {
gain D2
} “DRESS3” {
gain D3
}

if (D1”) {
} elif (D2) {
} else {
}

No No I meant it as the choice name not literally ‘choice_name’ haha

if she used gains and named them exactly as in the if/else it will work even with the typo

label annie_sadies
@YOUNG DANA walks to spot 0.884 79 183 in zone 2
@YOUNG DANA moves to layer 6
&YOUNG ANNIE is laugh_giggle
&YOUNG DANA faces right
YOUNG DANA (react_claphands_happy)
Let’s narrow down these choices!

choice
“Golden Girl”{

@YOUNG ANNIE walks to spot 0.641 49 287 in zone 3
@YOUNG ANNIE moves to layer 3

@YOUNG ANNIE changes into ANNIEsadiesgold

#Change the word MC_outfit1 to whatever your first outfit’s filename is - e.g. RACHEL_smart_casual

gain chose_annie_gold

}
“Precious Pink”{

@YOUNG ANNIE walks to spot 0.641 49 287 in zone 3
@YOUNG ANNIE moves to layer 3

@YOUNG ANNIE changes into ANNIEsadiespink

gain chose_annie_pink

}
“Beaming Black”{

@YOUNG ANNIE walks to spot 0.641 49 287 in zone 3
@YOUNG ANNIE moves to layer 3

@YOUNG ANNIE changes into ANNIEsadiesblack

#Change the word MC_outfit3 to whatever your third outfit’s filename is - e.g. RACHEL_workout_gear

gain chose_annie_black

}

@YOUNG ANNIE walks to spot 0.884 177 177 in zone 2
@YOUNG ANNIE moves to layer 3
@pause for a beat

    YOUNG ANNIE (think_rubchin)
(What do you think?)

choice
“This is the one!”{

    YOUNG DANA (admire_happy)
Someone get me a mop because I am drooling!

    YOUNG ANNIE (blush_shy)
You think?

}
“Try on another one.”{

goto annie_sadies

}

Oh I see the mistake

when you use gains you cant ungain them…

so when reader choices the first dress he will gain chose_annie_gold

but you alow him to go back and choice another dress…so he will get also the second gain …sbut because it will not “ungain” the first one your if/else will always go for the first choice

Oh, so how do I format the gains properly so that the other character can say the right line? Or is that not possible?

its possible I just see it looks like template somebody did for you…lol they havent thought ab out this as it seem.

gimme second I will redo it it will be easier than trying to describe what has to be done. :smiley:

label annie_sadies
@YOUNG DANA walks to spot 0.884 79 183 in zone 2
@YOUNG DANA moves to layer 6
&YOUNG ANNIE is laugh_giggle
&YOUNG DANA faces right

    YOUNG DANA (react_claphands_happy)
Let's narrow down these choices!

choice
“Golden Girl”{

@YOUNG ANNIE walks to spot 0.641 49 287 in zone 3
@YOUNG ANNIE moves to layer 3

@YOUNG ANNIE changes into ANNIEsadiesgold

@YOUNG ANNIE walks to spot 0.884 177 177 in zone 2
@YOUNG ANNIE moves to layer 3
@pause for a beat

    YOUNG ANNIE (think_rubchin)
(What do you think?)

choice
“This is the one!”{
gain chose_annie_gold
YOUNG DANA (admire_happy)
Someone get me a mop because I am drooling!

    YOUNG ANNIE (blush_shy)
You think?

}
“Try on another one.”{

goto annie_sadies

}

}
“Precious Pink”{

@YOUNG ANNIE walks to spot 0.641 49 287 in zone 3
@YOUNG ANNIE moves to layer 3

@YOUNG ANNIE changes into ANNIEsadiespink

@YOUNG ANNIE walks to spot 0.884 177 177 in zone 2
@YOUNG ANNIE moves to layer 3
@pause for a beat

    YOUNG ANNIE (think_rubchin)
(What do you think?)

choice
“This is the one!”{
gain chose_annie_pink
YOUNG DANA (admire_happy)
Someone get me a mop because I am drooling!

    YOUNG ANNIE (blush_shy)
You think?

}
“Try on another one.”{

goto annie_sadies

}

}
“Beaming Black”{

@YOUNG ANNIE walks to spot 0.641 49 287 in zone 3
@YOUNG ANNIE moves to layer 3

@YOUNG ANNIE changes into ANNIEsadiesblack

@YOUNG ANNIE walks to spot 0.884 177 177 in zone 2
@YOUNG ANNIE moves to layer 3
@pause for a beat

    YOUNG ANNIE (think_rubchin)
(What do you think?)

choice
“This is the one!”{
gain chose_annie_black
YOUNG DANA (admire_happy)
Someone get me a mop because I am drooling!

    YOUNG ANNIE (blush_shy)
You think?

}
“Try on another one.”{

goto annie_sadies

}
}

NARR
Here add what happens after the choice

thank you so much!

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