Help Remembering Past Choices

Hi there,

So in my story in chapter one the character goes to a party, and before the party she has the option to choose in outfit.
This is the coding I used
label dressing_game

    WILLOW
(What should I wear tonight?)

choice
“Outfit 1”{

@WILLOW walks to upscreen left in zone 3

@WILLOW changes into willow_casual

}
“Outfit 2”{

@WILLOW walks to upscreen left in zone 3

@WILLOW changes into willow_casual2

}
“Outfit 3”{

@WILLOW walks to upscreen left in zone 3

@WILLOW changes into willow_casual3

}

@WILLOW walks to screen center

@pause for a beat

    WILLOW (think_rubchin)
(Shall I wear this or try something else?)

choice
“Wear this outfit.”{

    WILLOW (idle_armscrossed_awkward_loop)
(This should do.)

}
“Try something else.”{

goto dressing_game

}

@WILLOW exits left

In chapter 3 she had been sick at the party and someone washed her clothes before but she woke up in something else. She needs to change into the clothes from the previous chapter for her trek home. How do I have her automatically remember her past choice and be changed into that outfit?

I did see a thread about this but I found it confusing.

Thanks so much

1 Like

So to do this, you need to use the gain command.

WILLOW
(What should I wear tonight?)

choice
“Outfit 1”{

@WILLOW walks to upscreen left in zone 3

@WILLOW changes into willow_casual
gain Outfit 1
}
“Outfit 2”{

@WILLOW walks to upscreen left in zone 3

@WILLOW changes into willow_casual2
gain Outfit 2
}
“Outfit 3”{

@WILLOW walks to upscreen left in zone 3

@WILLOW changes into willow_casual3
gain Outfit 3
}

@WILLOW walks to screen center

@pause for a beat

    WILLOW (think_rubchin)
(Shall I wear this or try something else?)

choice
“Wear this outfit.”{

    WILLOW (idle_armscrossed_awkward_loop)
(This should do.)

}
“Try something else.”{

goto dressing_game

}

@WILLOW exits left

So when you get to the scene in which to choice needs to be remembered it should go something like this


if (Outfit 1){

@WILLOW changes into Outfit 1

}

if (Outfit 2){

@WILLOW changes into Outfit 2

}

if (Outfit 3){

@WILLOW changes into Outfit
}

And continue the script as normal. :blush:

I hope this helped :blush:

1 Like

Thank you so much for your help, I really appreciate it! I can’t wait to see what this looks like. I tried to copy and paste your coding and this part doesn’t work

“Outfit 1”{

@WILLOW walks to upscreen left in zone 3

@WILLOW changes into willow_casual
gain Outfit 1
}

It says

"ERROR: There is { on line 345 that does not have a matching }

…It does though. Do you know how to fix this?

Thanks again :heart_eyes::blush:

1 Like

Do you mind sending a screenshot from your script?

1 Like

Absolutely.

Does this help?

1 Like

I can’t see the problem, really. Maybe try asking @RudeInception or @Dara.Amarie??

1 Like

Tysm :slightly_smiling_face:

1 Like

Check out: HOW TO: Remember Past Choices (if/elif/else)

You should use the choice name and option method instead of gains when it comes to a dressing game : )

3 Likes

Thanks :slight_smile: I saw that thread earlier and I didn’t understand how to do it. I’m working on my first story and am brand new here. Maybe I’ll try to give it another read

Hey, the problem with using the gain command with that code is that if the reader selects one, they gain that outfit, then if they go back to try the others, they gain those outfits, too, so pretty much you have all these gains and most likely the story will just play through else.

2 Likes

Ah, I see. Thank you! :blush:

We all get to learn a little :joy:

2 Likes
  1. Ok, first give your choice a name. I’ve added (OUTFIT) to your choice so that whatever option the reader chooses for this dressing game can be remembered.
  1. Then later on to have this remembered:

if ( OUTFIT is “Outfit 1”) {
[scene for Willow wearing willow_causal goes here]

} elif ( OUTFIT is “Outfit 2”) {
[scene for Willow wearing willow_casual2 goes here]

} else {
[scene for Willow wearing Outfit 3/willow_causual3 goes here]

}

^^

1 Like

Yeah you’re right, it takes time to become good at this stuff lol <3

Also, you’re an amazing helpful person :wink:

2 Likes

Thank you :smile: so are you.

Have a good day :blush:

2 Likes

Thank you both so much!!

What does it mean when it says
[scene for Willow wearing willow_causal goes here] (etc)

What is “scene” referring to? What information do I need to put in there? Sorry I’m confused. I put that in the script and the error message says "ERROR Expected Character or Scene change Found “[scene for WILLOWwearing willow_casual2 goes here]” instead. Did you forget to capitalize the name or close the ( ) around the animation?

Sorry for all my questions. I really appreciate you taking the time to help me!

Example of a scene:

@WILLOW changes into willow_casual

WILLOW
Hey!

WILLOW
Bla bla bla…

A scene is like this : )

1 Like

Silly me. I think it worked! Thank you so much, you’re amazing :relaxed:

1 Like

Just wanted to add this on for future reference in case you ever use gains to remember choices (p.s once gains are gained, they cannot be un-gained)

The reason you were getting that error is because:

Gain names cannot have spaces or special characters. They can only have letters, numbers, and/or underscores.”

So you wrote:
gain Outfit 1
gain Outfit 2
gain Outfit 3

in your script when all these gain names contain spaces and gains cannot have those.

Example of acceptable gains:

gain FOOD
gain Outfit_3
gain snow_ball
gain cheese
gain customer_service
and etc.

Examples of gains that are NOT acceptable:

gain Outfit 1
gain cheese cake
gain fruit a holic
and etc.

And remember that the choice name & option method is the best for dressing games. Also note that the choice name & option method as well as gains will NOT work with CC (character customization) templates.

Anyways, good luck with everything!

1 Like

TYSM :heart_eyes:

1 Like