The following code should produce a room with two men, Thales and Titus. They begin as being unmet to us, so we don’t know their names, only their descriptions as “older man” and “young man”. Upon asking either one about something, that man should become "met’, and so we have access to their proper name. The problem is that asking either one about something causes both of them to have their met names displayed thereafter… even though the one not talked to is still correctly marked as unmet.
There are other ways of doing this, but this is set within a larger framework, and reduced here to a minimal (non)working example. Anyone have an idea of what is going wrong here?
A MaleNPC is a kind of man.
A MaleNPC has texts called unmet_name and met_name.
People can be met or unmet. People are usually unmet. The player is met.
Rule for printing the name of a MaleNPC:
if the MaleNPC is met:
say "[met_name]";
otherwise:
say "[unmet_name]".
After asking someone (called the listener) about something:
if the listener is unmet:
now the listener is met;
say "You have met [the listener].";
otherwise:
say "You have already met [the listener].".
The Big Room is a room. The player is here.
Thales is a MaleNPC in The Big Room. "[Thales] is here. [Thales] is [if Thales is unmet]un[end if]met.".
The unmet_name of Thales is "an older man". Understand "older man" as Thales.
The met_name of Thales is "Big Thales".
TItus is a MaleNPC in The Big Room. "[Titus] is here. [Titus] is [if Titus is unmet]un[end if]met.".
The unmet_name of Titus is "a young man". Understand "young man" as Titus.
The met_name of Titus is "Big Titus".
Thanks again for any insight.