Help! My if, elif and else commands are not working as they’re supposed to😐

Hi so in my story there is a remembered choice for two outfits and I’ve checked the script a million times and there are no error whatsoever, yet even thought I use the if and else command, the character wears the same outfit in both cases when I clearly specified in my script two completely different outfits
Anyone else having this problem and anyone know how to fix it?

1 Like

That way doesn’t work. You should use flags instead.

1 Like

I don’t think I’ve used flags before, how do you use them?

1 Like

So when picking the outfits:

choice “Outfit 1” {

@CHARACTER changes into Outfit1
gain outfit1

} “Outfit 2” {

@CHARACTER changes into Outfit2
}

Then when remembering the outfit choice:

if (outfit1) {

@CHARACTER changes into Outfit1

} else {

@CHARACTER changes into Outfit2

}

Let me know if this works :blush:

1 Like

Thanks but that is exactly what I used, I’m sorry if I said I have never used flags before, I’m not aware of the names
I honestly don’t know what to do, I’m publishing tomorrow for the squad contest and I really need to fix it urgently

1 Like

Can you send a picture of the code for picking the outfit and the code for remembering the outfit?

1 Like

1 Like

Um I’m sorry… I don’t know what’s wrong :neutral_face:

1 Like

Yeah I know, it seems fine to me and I’ve refreshed the page again and again and I still get the same outfit in both choices

1 Like

@Dara.Amarie??? Any thoughts???

1 Like

Wait are you only trying it out in the writers portal?? Maybe it only works in the app.

1 Like

No no I tried the episode app

1 Like

Someone I know had I problem like this. She tried it in the app and it worked.

1 Like

Oh ok

1 Like

I guess it’ll have to do, hopefully everyone chooses the outfit that repeats😂

1 Like

Which outfit does it change into when testing the if/else?

1 Like

The one with the if (first one)

At first the outfits were reversed (the second one was the first one) and there was a different gain and the same thing happened but with the other outfit

Did you reset the gains in the previewer?

The issue is because of how you’re dressing game is formatted. Readers will immediately gain the black and comfy flag when they try on the black and comfy outfit. Even if they go back and choose to try on the other outfit, that flag is still gained, which is why it keeps going to the “if” part in the if/else.

If you want to use gains with a dressing game, you have to add a confirmation choice inside each outfit option

1 Like