So for some reason, my name variable won’t stay whatever I set it to in the first chapter of my WIP. I’ve run Quicktest in CSIDE and gone through it myself with no error messages, so I’m a bit lost on how to fix this.
The code to set your name in the last scene of the first chapter looks like this:
*fake_choice
#[i]"Mira!"[/i]
*set name "Mira"
#[i]"Celeste!"[/i]
*set name "Celeste"
#[i]"Gideon!"[/i]
*set name "Gideon"
#[i]"Oliver!"[/i]
*set name "Oliver"
#[i]"Fox!"[/i]
*set name "Fox"
#[i]"Reese!"[/i]
*set name "Reese"
#Something else.
I shout…
*input_text name
"[i]$!{name}![/i]" I shout. "My name is… $!{name}."
*set learnedname true
The scene then ends. I had previously used the *finish tag, but removed it thinking maybe it was messing with the code, but no change. In the last bit of dialogue, the name that is set in the previous fake_choice does show up as it is set. But, after going to the next chapter…
Which is what the name variable is initially set to in startup.
*create name "Unknown"
Pretty much all other string variables that I bothered to test work between scenes. So if I set genderword to “man” right after I set learnedname to true, and then have it show up in the text in the next scene, it does. It seems to only be an issue with *set name.
Which I guess means I could just change the variable to something like mc_name, but, like… I don’t want to? I’ve already used it quite a bit and gotten used to using it. I didn’t start having this issue until yesterday, anyway, and have been working on this for about a week.
Well, I am using the ‘name’ variable and has never had any issues with it, so it’s probably not that. -ponders-
Edit: That code should work, it’s not that different from what I use. One thing you can check is so you don’t have any *temp name variables in the document anywhere.
I tried switching to *choice, put a *label learnedname above the whole “xyz! my name is xyz!” bit, set that whole bit up, but same issue. *fake_choice is what you use when the choice you make doesn’t branch and just goes straight to the next lines after it instead of going to a specific label, so it’s useful for setting variables and not having to create a bunch of labels or *goto tags, which are mandatory for *choice tags.
Y’all I figured it out, I had a typo in one one of my temp variables where it was meant to be name3, but it was just name instead. I was so annoyed with *set name not working that I didn’t even notice my tempt variable wasn’t showing up lol. Looks like @malinryden was correct on that one, so thank you!