Tappable outfit help?

So I have been using Sara’s tappable outfit choices but I am stuck in one thing is that how can we remember the outfit choice we made?
I am changing my one characters outfit two times in one episode one in past and present so how should I remember present outfit choice that I made? Can anyone plzz helppp

1 Like

hi! try this out the if/elif/else:
To remember a choice you must use the if/elif/else coding, which looks like this:

if (condition_1) {

} elif (condition_2) {

} else {

}

if is always first, elif is always in the middle, and else should always be the last one by itself with no condition next to it; else is anything that isn’t the other conditions.

if you have 2 options, you only need to use if and else
if (condition_1) {
} else {
}

if you have 3 options, use if then elif then else
if (condition_1) {
} elif (condition_2) {
} else {
}

if you have more than 3 options, keep using elif for the middle parts, but always make sure that if is first and else is last
if (condition_1) {
} elif (condition_2) {
} elif (condition_3) {
} elif (condition_4) {
} else {
}

2 Likes

I did this but no use :pensive:

1 Like

have you tried the Flags/Gains??

1 Like

No how to use flag?

1 Like

choice

“Option Title” {

gain flag_name
}

To remember a choice using flags, you must use the if/elif/elsecode with only the flag name inside the parentheses for the if’s and elif’s:

if (flag_name1) {

} elif (flag_name2) {

} else {

}

Example:

NARRATOR
What do you want to drink?

choice
“Orange Juice” {
gain orange_juice

} “Coffee” {
gain coffee

} “Water” {
gain water
}

Then later on in the story, I’d use the if/elif/else code to remember which drink option a reader chose:

if (orange_juice) {

CHARACTER

Yuck! I hate pulp in my orange juice!

} elif (coffee) {

CHARACTER

I always need a cup of coffee in the mornings!

} else {

CHARACTER
Nothing is healthier than just water.

}

Things to remember:

  1. Once a flag is gained, you cannot “un-gain” it.​

So be sure to not use this method with dressing games. If you do, you will need to put a “yes/no” choice inside each outfit option with the flag inside the “yes” choice.

i recommend on visiting https://www.dara-amarie.com she has a bunch of templates and help

2 Likes

Ok I will try this one

1 Like

I actually think that assigning points is the easiest way to do this, since flags cannot be ungained which can make dressing games a bit tricky!

Take a look at this code for example. She assigns points to outfits (when she changes into outfit 1, outfit =1) and so on and so forth. Then later on, you can code

if (OUTFIT =1) {
} elif (OUTFIT =2) {
} else {
}

To remember the choice you’ve made. Hope this was all clear!

2 Likes

I don’t know what I am doing wrong :pensive::pensive:

It worked gain method but it won’t be any problem after I publish the story?

1 Like

Hey it worked the gain method but it won’t be any problem after publishing it right?

1 Like

no there shouldnt be a problem

1 Like

Outfit = 1 where should we add this?? In Sara’s code?

No, outfit was just an example. Your code already has the point system built into it, where it says COCO =1 so you don’t have to change anything! The code you’re using uses those numbers so it will remember the outfit in the future. Just use

if (COCO =1) {
} elif (COCO =2) {
} else {
}

And it should be remembered in the furure. Take out the “outfit =1,” that isn’t necessary since I didn’t realize your original code had points built into it.

1 Like

Okkkk got it thank you :heart::pleading_face::sob:

Thank you :heart::heart:

1 Like

np! :blob_hearts:

1 Like

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