Problem with coding if/else choice

I wanted to make this part where whichever outfit the MC chose, her friend would wear the one you didn’t choose. If you chose the cute outfit, then Rachel would wear the sexy one. However, if you choose the sexy outfit, Rachel also wears it. Do I need to code this differently? (coding below)

choice
“Simple” {

@ERIN is dustoff_neutral_loop
@ERIN changes into simple_cute

    ERIN (flirt_wink_atcamera)
Super simple and cute...

gain chose_simple_cute

}
“Sexy”{

@ERIN is dustoff_neutral_loop
@ERIN changes into simple_sexy

    ERIN (idle_armscrossed_shifteyes_loop)
Super chic and sexy...

gain chose_simple_sexy

}

if (chose_simple_cute){

@RACHEL changes into simple_sexy

}
else{

@RACHEL changes into simple_cute

}

2 Likes

Try putting else on same line with closing bracket of if
} else {
@RACHEL changes into simple_cute
}

sorry Rachel for tagging you

2 Likes

Using gains are one way of changing both of their outfits, but you can also include Rachel’s outfit change within the choices.

Here’s a script example of what I mean:

choice
“Simple” {
@ERIN is dustoff_neutral_loop
@ERIN changes into simple_cute
@RACHEL changes into simple_sexy

[Insert dialogue here]

}“Sexy”{
@ERIN is dustoff_neutral_loop
@ERIN changes into simple_sexy
@RACHEL changes into simple_cute

[Insert dialogue here]
}

That way, both characters are changing their outfits at the same time. And you don’t need to use gains.

Edit: Also, you’ll need to put Rachel in a different scene, so the readers can’t see her outfits being changed.

2 Likes

That makes so much sense and seems easier too omg thank you. And yeah I have Rachel in a different zone. There was other stuff in between that coding lmao. I’m gonna try this and see how it works!

EDIT: It works!

2 Likes

Will this choice be remembered for the next episode though?

Moved to Directing Helps and Tips since this involves coding. Make sure to check out our Forum Tutorial for more info about where to correctly create topics, and feel to PM me if there are any questions. :wink:

All outfits will stay unless you manually change them in the script again, even into the next episode. You won’t need to use gains unless you plan on changing their outfits in between :blush:

1 Like

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