Reusable Outfits?

I was trying to code a closet that allows readers to keep outfits they have purchased when they visit their closet again. I tried the code before, but when I previewed it the if/else was completely skipped over. Can you just not nest choices in an if/else? Am I doing something else wrong? My eyes are going sideways >.>

label SELECTED_OUTFIT1
@LYLA changes into OUTFIT1
LYLA (talk_flirt_charming_atcamera)
This outfit is so sexy!

    LYLA (talk_neutral)
Is this what I should wear?

if (PURCHASED_OUTFIT1) {
choice “Definitely”{
goto STORY2
}
“Let me look again”
goto LYLA_DEFAULT_OUTFIT}
}else {
choice (purchase_outfit1) GEMS:15"Definitely" {

goto STORY2

} “Let me look again” {

goto LYLA_DEFAULT_OUTFIT

}
}

I should also mention that I only included the code for the if/then part. There’s more code for the outfit change of course. Without the if/then everything works as expected.

Have you gone through the episodes from where the first time paying for the outfit was an option and through to this choice? If you haven’t done a complete run-through of the episode previews, you may not have gotten the gain flag that recognizes that you’ve already “paid.” I’m not 100% sure this is the solution, but it may be beneficial to try it. Anyway, I hope this helps.

Thanks for the tip, but sadly that didn’t seem to be the issue. I mean it would literally skip everything in the if/else scenario and just go the next line after it which was label SELECTED_OUTFIT2. It would just start running through the outfit 2 scenario as if there was no code there at all. I don’t know if maybe it was a glitch? I tried restarting my computer…clearing cookies…everything.

I ended up changing the code to have an “if/then” further up. Basically if the person unlocked that outfit it would show as available otherwise it just wouldn’t be there at all. When I ran through that one it just didn’t show the outfit which probably means I didn’t unlock it…or it’s just skipping the code like it did before…I hope it’s not that.

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