Okay, I feel like a complete dork because this is so basic and relevant to IF that I know it HAS to be part of Inform, I just can’t seem to find any reference or information on it. How do you do a text substitution to print a pronoun for a noun?
I want to build a text that looks something like this
This text should work with male and female characters, so I need text substitution, so ideally I would write something like this
I look at [the noun] and point at [him-her for the noun].
Sadly there is no [him-her] rule and none of my tries to shuffle things and try different ways have yielded any results, so I was wondering if anyone could tell me how to properly do this? I know I could easily implement the necessary rules myself, but I can’t believe the Inform does not have something like this built in.
Yeah, it’s not in there. All sorts of other things but no pronouns like “him”, “her,” or “them.” No matter I’ve implemented what I needed myself. In case anyone needs it, here’s the code
[code]To say him-her for (P - a person):
if P acts plural:
say “them”;
otherwise:
if P is female:
say “her”;
otherwise:
say “him”.
To say he-she for (P - a person):
if P acts plural:
say “they”;
otherwise:
if P is female:
say “she”;
otherwise:
say “he”.
[/code]
With the latest version, [them] is built in and should be substituted correctly. [Them] is mentioned in 14.5 of the most recent version of Writing with Inform, too. Maybe your Inform7 didn’t update correctly. Weird.
For reference if you get the built-in version working or if someone else comes looking, the normal way to use [them] in 6L38 is like this:
Before examining someone:
say "I stare at [the noun], examining [them] thoroughly."
If you’re not referencing the pointed-at person with [the noun], Inform needs to know who:
Before examining someone:
say "I examine [regarding the noun][them] thoroughly.".
Doh! I can’t believe I did not see that. The concept of plural pronouns as a default still feels unusual to me but I’m sure I’ll get used to it.
Thanks for the guidance.