Keeping a chosen outfit on after a change of scene

So basically I have a dressing game template with three outfit choices, but for some reason whenever I move on to the next scene after choosing an outfit, it automatically defaults to outfit #3 even if I choose outfit 1 or outfit 2. I’ve tried everything to fix the coding but nothing is making sense to me. Can someone please help me figure out why it’s doing this? Here’s my script for reference!

label dressing_game_1

    LUNA (talk_think_neutral)
What should I wear today?

choice (DAYOUTFIT)
“Outfit 1” {
@LUNA changes into LUNA_dayoutfit1

} “Outfit 2” {
@LUNA changes into LUNA_dayoutfit2

} “Outfit 3” {
@LUNA changes into LUNA_dayoutfit3

}

@pause for a beat

    LUNA (think_rubchin)
(Do I want to wear this one?)

choice
“This is perfect!” {

} “Let me try something else” {
goto dressing_game_1
}

@LUNA exits right

if (DAYOUTFIT is “Option 1”) {
@LUNA changes into LUNA_dayoutfit1

} elif (DAYOUTFIT is “Option 2”) {
@LUNA changes into LUNA_dayoutfit2

} else {
@LUNA changes into LUNA_dayoutfit3
}

INT. LUNA ROOM
@cut to zone 1

@LUNA enters from left to screen left

@pan to zone 2 AND LUNA walks to spot 0.695 189 187 in zone 2

You should use gains. I have no idea if it’s actually necessary or not, but I find this method a lot easier. So your code will look like this:

choice (DAYOUTFIT)
“Outfit 1” {
@LUNA changes into LUNA_dayoutfit1
gain LUNA_dayoutfit1

} “Outfit 2” {
@LUNA changes into LUNA_dayoutfit2
gain LUNA_dayoutfit2

} “Outfit 3” {
@LUNA changes into LUNA_dayoutfit3
gain LUNA_dayoutfit3

}

Hope this helped. :two_hearts:

So would it be that code instead of the if/elif/else?

Yes, that code should replace the if/elif/else. If you wanted to do a flashback scene or something of the sort, that’s when the if/elif/else code would come into play. But it isn’t necessary to keep that section of the code if you don’t need it. :slight_smile:

The simplest way to to a dressing game without using gains or if/elif /else would be:

label dressing_game

NARRATOR
What should I wear?

choice
“Outfit 1” {
@CHAR changes into into outfit1
}

“OUTFIT 2” {
@CHAR changes into outfit2
}

“OUTFIT 3” {
@CHAR changes into outfit 3
}

CHAR (think)
Should I wear this?

choice
“Yes” {

CHAR
This is perfect!

}

“No” {
goto dressing_game
}

#story goes here

I’ve never had to use the if/elif/else or gains for outfit changes so this works perfectly fine for me.

Hope this helped!

Are you using the web preview on the portal to test this? It won’t remember choices, check it on the app. Also, she will stay in the chosen outfit until you tell the script to change it. So you don’t actually need the if/elif/else straight after the dress game.

In the if sections you need to use “outfit 1” NOT option 1. And you need to do the same for the second option. But you shouldn’t need to use any of this to keep an outfit on a character over different scenes.

1 Like

I took out the whole if/elif/else code and it works! thanks so much for your help everyone!

1 Like

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