intfiction.org

The Interactive Fiction Community Forum
It is currently Mon May 20, 2013 2:44 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: SpecialTopic
PostPosted: Mon Mar 26, 2012 8:17 pm 
Offline

Joined: Thu Mar 01, 2012 9:08 pm
Posts: 31
I have a ConvNode with 4 SpecialTopic objects. It is working fine, even though I had to set 'timesToSuggest = 1' since the default wasn't working (just throwing it out there in case I missed something in the doc).

Anyway, when three specific SpecialTopic objects are chosen (curiositySatisfied is true for each object), I would like to move on to another ConvNode with a new batch of SpecialTopic objects.

I started to do this with extra coding (like I would do with TADS 2) but then realized that T3 probably has a better/slicker way of handling it -- I just don't know what that is. I've gone through the the doc, but no immediate solution came to me.

Any advice on the best approach for this?

Thanks,
-- Mike


Top
 Profile Send private message  
 
 Post subject: Re: SpecialTopic
PostPosted: Wed Mar 28, 2012 9:04 am 
Offline

Joined: Thu Mar 01, 2012 9:08 pm
Posts: 31
So this ended up being rather simple. (well, simple after several aborted attempts).

I don't know of any drawbacks yet, but here's how I solved it -- generic code to follow.

In the NPC object, in the nifty afterAction(), I did:

Code:
afterAction() {
    if (topic1.curiositySatisfied && topic2.curiositySatisfied && topic3.curiositySatisfied)
        "<.convnode newConversationTopics>";
}

And as for the timesToSuggest issue I stated above, that appears to be a conflict with some code I lifted from the Tour Guide. I don't know why it doesn't work for SuggestedTopics, but at least I know where the conflict is...

Code:
modify SuggestedTopic
    timesToSuggest = (ofKind(EventList) ? eventList.length() : 1)
;

You would think I would have remembered why I lifted that code... :)

-- Mike


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Group