intfiction.org

The Interactive Fiction Community Forum
It is currently Thu May 23, 2013 4:44 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SuggestedTellTopic
PostPosted: Mon Mar 12, 2012 8:42 pm 
Offline

Joined: Thu Mar 01, 2012 9:08 pm
Posts: 31
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


Top
 Profile Send private message  
 
 Post subject: Re: SuggestedTellTopic
PostPosted: Mon Mar 12, 2012 10:29 pm 
Offline

Joined: Thu Mar 01, 2012 9:08 pm
Posts: 31
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


Top
 Profile Send private message  
 
 Post subject: Re: SuggestedTellTopic
PostPosted: Mon Mar 12, 2012 10:58 pm 
Offline
User avatar

Joined: Tue Apr 20, 2010 2:48 pm
Posts: 687
If haven't already, you should read the "Entering and navigating a tree" section of:

http://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:

http://tads.org/t3doc/doc/techman/toc.htm


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group