Clearing pronoun meanings

In my WIP, you play more than one character. I just realised that at the moment when I switch to the next character, I want to be able to blank irrelevant pronouns. Otherwise, typing PRONOUNS shows references to things the current PC shouldn’t have any knowledge of.

IT is almost always made instantly relevant just by the automatic LOOK that occurs when changing characters. But frequently HIM, HER and THEM don’t have a relevant target to get a free update, so they stay what they were before.

Is there a way I can return specific, or all, pronouns to the ‘unset’ status you get at the start of any Inform game?

Thanks.

-Wade

I’m not sure that there’s a built-in phrase to handle this. There might be a suitable extension somewhere. If not:

Include
(-

[ UnsetAllPronouns   i ;
    for (i=1: i<=(LanguagePronouns-->0)/3: i++)
	    LanguagePronouns-->(3*i) = NULL;
];

-)

To clear all pronouns:
    (- UnsetAllPronouns(); -).
2 Likes

Hm, that code didn’t seem to work. That is, when I ‘clear all pronouns’, they remain as they are. Or at least, they aren’t all going back to ‘unset’. This isn’t a trick where they’re automatically being reset by the room. Basically I change characters, clear the pronouns, then let the room refill them. At that point, pronoun ‘them’ is still set to something that’s no longer present in the location but which was encountered by the previous character.

-Wade

Oops, testing was too cursory. The for loop should check <= instead of < to make sure that “them” (the last pronoun in the table array) is unset.

I adjusted the code. It should work now.

1 Like

Thanks much, it’s working!

-Wade