Remembering tappable overlays choice (dressing game)

I’ve been coding for days, so my brain is full of codes and numbers. That’s why I’m probably not seeing what I did wrong here.

I have a tappable dressing game in my script, which is working perfectly fine, but somehow the if/else is not working. Whenever I pick OUTFIT1, the character changes into OUTFIT1 in the dressing game, so all is working fine there. But, when I refer to it in a different scene, she changes into the wrong outfit.

The dressing game:

The if/else part that’s not working:
(When I pick OUTFIT1, the character changes into ELEANOR_outfit1coat instead of ELEANOR_defcoat)

Is the naming the choice method not working in this scenario and should I be using gains or am I overlooking something very simple? :sweat_smile:

1 Like

I think you should use gains here to use if/else code. I hope it will work.

It it supposed to say ‘outfitch1’ or…?

Yes, in the dressing game I named the tappable choice OUTFITCH1 too (see first screenshot).

1 Like

I think so too. Too bad, I really prefer naming choices over gains. Oh, well… :sweat_smile:

2 Likes

It’s working fine with gains. This issue has been solved. :slightly_smiling_face:

Please close this thread @Jeremy / @Sydney_H.

2 Likes

It’s not working because in CHOICE your character changes into ELEANOR_default and then in if/else she changes into ELEANOR_defcoat

Can you send me your coding for that? I really wanna use the tappable dressing game

I don’t mind sending my code, but my code starts with background A, then the dressing game is in background B, then after clicking the outfit it goes back to background A again. If the reader wants to try the other outfit it goes to background B again and after trying out that outfit it goes back to background A. So, in my script there is a lot of scenes for this dressing game and it might be a little confusing when you see it. :sweat_smile:

A more general guide can be found here: A Basic Guide to Tappable Overlays

A script to do it within 1 scene (and 2 outfit choices):

BACKGROUND with OUTFIT1 to POSITION (in zone x at layer x) with OUTFIT2 to POSITION (in zone x at layer x)

CHARACTER'S SPOT (@CHARACTER stands or @CHARACTER spot x.xxx xxx xxx)

tappable
"OUTFIT1" { <-- this should be the exact same name as the overlay

@CHARACTER is dustoff_neutral_loop

@pause for TIME

@CHARACTER changes into CHARACTER_outfitname

} "OUTFIT2" { <-- this should be the exact same name as the overlay

@CHARACTER is dustoff_neutral_loop

@pause for TIME

@CHARACTER changes into CHARACTER_outfitname

}

Thank you! :grin:

No, that wasn’t the problem.
That coding was correct, because the character needed to choose between outfit1 and outfit2. Depending on their choice, their next outfit would be the same except with a coat (because my story takes place in Europe and it’s cold here when you go outside lol).

So if choice is ELEANOR_default, Eleanor needs to change into ELEANOR_defcoat in the next scene.

But the problem has been fixed by using gains now. :slightly_smiling_face:

1 Like

You’re welcome! Let me know if you need any help.

1 Like