Hello!
This weekend I’m working on familiarizing myself with CS so that I can finalize my formal pitch, and so far things are going swimmingly (at least, once I hammered gendered pronoun variables into my brain…). I have hit a snag that I can’t seem to solve, though.
What I want to do is give the player the option to select their name from three different options. The three options will be different depending on the gender of the player. In both cases, the fourth option will be a text entry field so that the player can enter their own name.
I’ve tried this two different ways, based on the information documents and other game startups that I was looking at for reference. I apologize in advance, because this is probably gonna be sort of spammy! The way it’s written in my document right now is:
*choice
*if (gender="female")
#Kelsey Hall
*set name "Kelsey"
*set petname "Kell"
*goto TimePasses
#Moira Hall
*set name "Moira"
*set petname "Mar"
*goto TimePasses
#Samantha Hall
*set name "Samantha"
*set petname "Sam"
*goto TimePasses
#None of these are your name! Your first name is...
*goto input_name
*label input_name
*input_text name
*goto nameconfirm
*label nameconfirm
Your name is $!{name} Hall, of course.
*choice
#Of course.
*set name "$!{name}"
*set petname "sweetheart"
*goto TimePasses
#What? No it isn't! It's...
*goto input_name
*if (gender="male")
#Evan Hall
*set name "Evan"
*set petname "Ev"
*goto TimePasses
#William Hall
*set name "William"
*set petname "Billy"
*goto TimePasses
#Joshua Hall
*set name "Joshua"
*set petname "Josh"
*goto TimePasses
#None of these are your name! Your first name is...
*goto input_name
*label TimePasses
This doesn’t work for reasons I think I understand – the *choice command is expecting a #choice in the next indented entry, no? But this is how I’ve seen it written on the wiki, a la this:
*choice
*if (var)
#This option 1
*goto next
This isn’t the only/first way that I’ve tried this, though. I initially tried something like this:
*if (gender="female")
*choice
#female choice 1 as above
#female choice 2 as above
#female choice 3 as above
*if (gender="male")
*choice
#male choice 1 as above
#male choice 2 as above
#male choice 3 as above
And that did not work. If I remember correctly, it would display the female options for both genders, as though it wasn’t checking the male ones at all, which I thought might be the result of formatting. I did not know how to determine this, though I tried indenting and unindenting things fruitlessly. And frowning at notepad++ a lot.
The other option I tried after that didn’t work was this:
*if (gender="female")
*goto femnames
*if (gender="male")
*goto malenames
*label femnames
*choice
#female choice 1 as above
…etc., with a separate *label for malenames, containing a separate *choice list. This also didn’t work.
Can anyone point to what I’m missing…? I’d be hugely grateful! Please keep in mind that I’m not a programmer and I’ve only been learning Choicescript since the start of the weekend, and use newbie-friendly words when you explain it to me, haha. Thanks in advance!