Start new scene after query topics exhausted

Hello,

I’m wondering if there’s a way to start a scene once the PC has asked a few questions that are written as Query Topics.

I have implemented the basic Who, What & Where queries and after those are exhausted, the NPC is going to go to sleep via a Scene.

I tried adding isDone to each of the topics, but I’m not sure how to check the condition of the that property to start the scene. I guess I am referencing an Agenda item, which may not work the same.

For example, using this topic as an example, what would I use to test if thisTopic.isDone is true?

++ QueryTopic 'what' 'do you want'
"<q>What do you want?</q> you ask.<br />
<q>I just want to sleep.</q> {The subj erik} replies sleepily. "
isActive = gRevealed('erik-bed')
isDone = true
;
1 Like

TopicEntries, such as QueryTopic, don’t use an isDone property in the library. You could try testing theiir curiositySatisfied property which the library should set for you, but you’d need to give your QueryTopic a name to reference it, e.g.,

++ whattDoYouWantQ: QueryTopic 'what' 'do you want'
"<q>What do you want?</q> you ask.<br />
<q>I just want to sleep.</q> {The subj erik} replies sleepily. "
isActive = gRevealed('erik-bed')
;

Then your scene coluld test for

startsWhen = whattDoYouWantQ.curiositySatisfied && whoQ.curiositySatisfied
   && WhatQ,curiositySatisfied

An alternative would be to have the topic response to each QueryTopic reveal a tag (e.g. <.reveal q1>' and you could then test for gRevealed('q1') etc.

3 Likes

Thanks to you both, having solved something I know that I have to code later !

I only add that, perhaps, the testing for a revealed tag is, how to say, potentially more generic, and perhaps also more flexible (never experimented/fooled around with curiositySatisfied.

Best regards from Italy,
dott. Piergiorgio.

ps. of course, this topic is now bookmarked for later reference :wink:

1 Like