Howdy fine folks.
I am hoping someone can point me in the right direction – I’ve searched this base and other doc, but am a bit stumped for now.
Here’s the scenario.
An NPC arrives and greets the PC, asking him a question.
At this point, I would like the SuggestedTellTopics to take over and offer some advice on what to tell the NPC.
I’ve tried using .suggestTopics(true) for the NPC (and the <.topics> method) but T3 replies with “You were not currently talking to anyone.”
I can type ‘>Talk to NPC’ and all is well, but I don’t want the PC to have do that.
Any advice?
Thanks,
– Mike
So yeah… I went about it a different way and solved it.
First, thanks to Eric Eve for posting All Hope Abandon source code into the archive.
I ended up scratching the SuggestedTellTopic code in favor of SpecialTopic (that gave me more freedom on the type of response the PC could use).
When the NPC shows up, I now perform .initiateConversation(actorState, ‘name’). The ‘name’ ConvNode then takes it from there.
I’m sure I’ll need to tweak it a bit, but the prototype is working like a charm.
Thanks again, Eric!
– Mike
RealNC
3
If haven’t already, you should read the “Entering and navigating a tree” section of:
tads.org/t3doc/doc/techman/t3conv.htm
it explains how NPCs can initiate a conversation.
For the whole context, take a look at “Creating Dynamic Characters” (in “Part II”) at:
tads.org/t3doc/doc/techman/toc.htm