Here’s a code snippet that doesn’t work in the way I’d like it to:
+ DefaultTellTopic
topicResponse = "<.q><<if (joe.canSee(gIobj))>>I'm looking right at it, man<<else>>Not
too sure what you're talking about, guy<<end>>,<./q> Joe replies. "
;
The problem, of course, is that the ‘tell joe about X’ command produces a topic match, not a gIobj. (Thus gIobj is always nil when this code is executed.)
It should be obvious what I’m trying to do. If the NPC can see the object that is the topic, I want to print one response, and if he can’t see it, I want a different response. So … how can I get at the resolved topic object in order to create a logical test for whether Joe can see it?