I'm creating a game in which the player can select from masculine, feminine, or neutral pronouns. I've tried to come up with an 'if' statement, based off the player's selection in a menu. My goal is to be able to write the story by using pronouns as variables, such as "[They] walked back to [their] room, hoping that [they'll] find the answer." That way, the game would replace the they / their / they'll with he / his / he'll, or she / her / she'll as necessary.
Here's a sample of the code.
Code: Select all
label pronounselectb:
"{i}Please select your preferred pronouns.{/i}"
menu:
"he / him / his":
$ pronoun = 'masculine'
"she / her / hers":
$ pronoun = 'feminine'
"they / them / theirs":
$ pronoun = 'neutral'
if pronoun == "masculine":
$ they = "he"
$ them = "him"
$ their = "his"
$ they're = "he's"
$ they'll = "he'll"
$ They = "He"
$ Them = "Him"
$ Their = "His"
$ They're = "He's"
$ They'll = "He'll"
$ are = "is"
$ san = "kun"
elif pronoun == "feminine":
$ they = "she"
$ them = "her"
$ their = "hers"
$ they're = "she's"
$ they'll = "she'll"
$ They = "She"
$ Them = "Her"
$ Their = "Hers"
$ They're = "She's"
$ They'll = "She'll"
$ are = "is"
$ san = "chan"
elif pronoun == "neutral":
$ they = "they"
$ them = "them"
$ their = "their"
$ they're = "they're"
$ they'll = "they'll"
$ They = "They"
$ Them = "Them"
$ Their = "Their"
$ They're = "They're"
$ They'll = "They'll"
$ are = "are"
$ san = "san"
"I circled the option for [pronoun] pronouns, since I prefer to use [they] / [them] / [their]."
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/prologue.rpy", line 234: invalid syntax
(Perhaps you left out a " at the end of the first line.)
they're = "he's"
^
File "game/prologue.rpy", line 240: invalid syntax
(Perhaps you left out a " at the end of the first line.)
They'll = "He'll"
^
File "game/prologue.rpy", line 253: invalid syntax
(Perhaps you left out a " at the end of the first line.)
They're = "She's"
^
File "game/prologue.rpy", line 263: invalid syntax
(Perhaps you left out a " at the end of the first line.)
they'll = "they'll"
Could someone help point me in the right direction to get this fixed? Alternatively, if there are better ways to go about assigning pronouns in a story, could someone direct me to places I might learn more? Thanks in advance for your help!!