So i was having trouble with displaying the full name in stats section so i came up with a simple code and a simple tutorial on it. I checked the related topics and saw it is explained there but there are not a pre-written code that one can copy past and edit as they will so im posting it here just to give them something to work on and a little understanding on variables.
As choicescript wont recognize two variables in one string, you just need to turn those variables into one variable. All explained below.
P.S: If you find this topic unnecessary, it can be deleted.
*comment =========================================================================================================================================
*comment This code will let you give a choice to the reader to choose their given name and last name seperately and then turn it into one variable so you can display the full name in stats section.
*comment =========================================================================================================================================
*comment The part below will go to the top of the startup file.
*comment ------------------------------------------------------------
*create givenname "unknown"
*create lastname "unknown"
*create Name "unknown"
*comment -------------------------------------------------------------
*comment After creating the three variables above, you will need to go to choicescript_stats file and type this simple code below *stat_chart .
*stat_chart
text Name
*comment You won't repeat *stat_chart command. You will probably have that section there. Just type --> text Name below that section. Mind indentation!
*comment Now the code below will set up your name choice so just change the first three options with whatever you want and copy past it.
*comment A little note on this. You can't display the full name by typing --> text ${givenname} ${lastname} in the stats as choicescript won't recognize such comand.
*comment So you're just basically creating a seperate variable "Name" to be able to display characters full name in stats screen.
*comment This should do the trick.
*label input_givenname
*choice
#Pre-given
*set givenname "Pre-given"
*goto givenname_check
#given_names
*set givenname "given_names"
*goto givenname_check
#Here
*set givenname "Here"
*goto givenname_check
#None of these, let me choose my own given name.
What's your given name then?
*input_text givenname
*set givenname "${givenname}"
*goto givenname_check
*label givenname_check
Your given name is ${givenname} , did i get it correct?
*choice
#Yes, indeed.
*goto input_lastname
#No, how hard it could be to get my name correctly!
You're right. Im sorry…
*goto input_givenname
*label input_lastname
*choice
#Pre-given
*set lastname "Pre-given"
*goto lastname_check
#given_lastnames
*set lastname "given_lastnames"
*goto lastname_check
#Here
*set lastname "Here"
*goto lastname_check
#None of these, let me chose my own last name.
What's your last name then?
*input_text lastname
*set lastname "${lastname}"
*goto lastname_check
*label lastname_check
Your last name is ${lastname} , did i get it correct?
*choice
#Yes, indeed.
*goto Name_check
#No, how hard it could be to get my last name correctly!
You're right. Im sorry…
*goto input_lastname
*label Name_check
Your name is ${givenname} ${lastname} , did i get it correct?
*choice
#Yes, indeed.
*set Name "${givenname} ${lastname}"
*finish
#No, how hard it could be to get my name correctly!
You're right. Im sorry…
*goto input_givenname
*comment You can delete the check sections but you will need to change "goto" commands due to your labels.
*comment I think it wont be of any harm to double check the choices :)