Twine V. 2.3.15, SugarCube and Javascript.
Hello everyone, I am brand new to game development with Twine, but have been enjoying it a lot. I had one (multi-part) question. I am doing a character creation thing that specifically asks for pronouns, and I have three options. None of them seem to work how I want it to though, occasionally it will work for only one option, but I think I am going wrong with the actual selection, like the listbox isn’t executing the commands properly. I am envisioning and drop-down menu that the player can select their pronouns from, and then from there they would be set in stone so during the course of the story I can just write whichever $ command is grammatically appropriate for their chosen pronoun. Should I be doing this in the StoryInit passage? Or can I just cram all the ‘if’s’ into the same passage as the listbox? I am very new, so any help would be tremendously appreciated.
<<listbox "$pronouns">>
<<option 'She/Her' set $pronouns to "1">>
<<option 'He/Him' set $pronouns to "2">>
<<option 'They/Them' set pronouns to "3">>
<</listbox>>
<<if $pronouns is "1">>
<<set $heshe to 'she'>>
<<set $capitalheshe to 'She'>>
<<set $hisher to 'her'>>
<<set $capitalhisher to 'Her'>>
<<set $himher to 'her'>>
<<set $capitalhimher to 'Her'>>
<<set $hishers to 'hers'>>
<<set $capitalhishers to 'Hers'>>
<<set $himselfherself to 'herself'>>
<<set $capitalhimselfherself to 'Herself'>>
<</if>>
<<if $pronouns is "2">>
<<set $heshe to 'he'>>
<<set $capitalheshe to 'He'>>
<<set $hisher to 'his'>>
<<set $capitalhisher to 'His'>>
<<set $himher to 'him'>>
<<set $capitalhimher to 'Him">>
<<set $hishers to 'his'>>
<<set $capitalhishers to 'His'>>
<<set $himselfherself to 'himself'>>
<<set $capitalhimselfherself to 'Himself'>>
<</if>>
<<if $pronouns is "3">>
<<set $heshe to 'they'>>
<<set $capitalheshe to 'They'>>
<<set $hisher to 'theirs'>>
<<set $capitalhisher to 'Theirs'>>
<<set $himher to 'them'>>
<<set $capitalhimher to 'Them'>>
<<set $hishers to 'theirs'>>
<<set $capitalhishers to 'Theirs'>>
<<set $himselfherself to 'themselves'>>
<<set $capitalhimselfherself to 'Themselves'>>
<</if>>