Dialogue Entry will not advance upon completion of quest entry

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
joshwinowiecki
Posts: 2
Joined: Mon Oct 26, 2020 7:39 pm

Dialogue Entry will not advance upon completion of quest entry

Post by joshwinowiecki »

I am new to the Dialogue System.

I have a a string of dialogue entries that stop and then continue after a quest entry equals success. During game play the conversation advances to this point and then ends. I have used the Debug feature and see that the evaluation of the quest entry occurs before the conversation gets to that point and then ends.

Dialogue System: Add Link (Player): ID=2:10 'I remember that much' (True) NPC
Dialogue System: Hallway says 'Its down the hall on the left.' NPC
Dialogue System: Lua(return CurrentQuestEntryState("TeacherLoungeKey", 1) == "success")
Dialogue System: Block on False Link (Player): ID=2:11 'Looks like my classroom without my friends, where is everyone?'
Condition='CurrentQuestEntryState("TeacherLoungeKey", 1) == "success"' Should play upon meeting conditions correct?
Dialogue System: FPSController says 'I remember that much' This is as far as the conversation goes
Dialogue System: Sequencer.Play( Delay(3)@0 )
Dialogue System: Sequencer: Delay(3)
Dialogue System: Ending conversation.

I then walk into my trigger and it fires....see below.


Dialogue System: Lua(return CurrentQuestEntryState("TeacherLoungeKey", 1) == "active")
Dialogue System: Dialogue System Trigger is firing OnTriggerEnter.


Any help is appreciated. I hate to ask but I have looked through the manual and the boards without finding where this is wrong.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Entry will not advance upon completion of quest entry

Post by Tony Li »

Hi,

Thanks for using the Dialogue System!

A couple of things may be in play here. (Apologies in advance as I butcher your conversation and quest to put together some hypothetical examples.)

First, be aware that Conversations Evaluate One Extra Level Ahead. That's one of the reasons why your conversation is ending earlier than you expect. Conversations will go until they reach a state where no links' Conditions are true. Then the conversation will end.

However, I don't think that's the whole story here. It sounds like you want one of these two things to happen:

1. You want the conversation to end at 'I remember that much'. Then the player walks into the trigger, and it resumes the conversation at 'Looks like my classroom...'.

2. OR, the conversation stays active on the 'I remember that much' line and waits until the player walks into the trigger. Then it proceeds to 'Looks like my classroom...'.

For (1), structure your conversation similarly to this:

jwinowiecki1.png
jwinowiecki1.png (35.64 KiB) Viewed 149 times

If the quest entry is active, it will play the branch on the left. When the player gets to "I remember that much", the conversation will end.

Configure the trigger to advance the quest entry state and resume the conversation:

jwinowiecki2.png
jwinowiecki2.png (46.35 KiB) Viewed 149 times

Since the trigger just set the quest entry state to success, the conversation will play the branch on the right.


---

For (2), you'll need to use a sequencer command. (Sequencer Tutorials)

The WaitForMessage() sequencer command waits until it receives a text string that you specify. Here's an example:

jwinowiecki3.png
jwinowiecki3.png (23.1 KiB) Viewed 149 times

The conversation will wait at "I remember that much" until something sends the sequencer the message "EnteredLounge". For example, you could add a script to the trigger collider that contains a method such as:

Code: Select all

void OnTriggerEnter(Collider other)
{
    if (other.CompareTag("Player")) Sequencer.Message("EnteredLounge");
}
joshwinowiecki
Posts: 2
Joined: Mon Oct 26, 2020 7:39 pm

Re: Dialogue Entry will not advance upon completion of quest entry

Post by joshwinowiecki »

Your interpretation was spot on. My expectation was that trigger event would be monitored within a conversation not requiring a restart.
Picture1.png
Picture1.png (114.87 KiB) Viewed 141 times
I followed option 1, added a few condition check and figured it out. Thank you!
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Entry will not advance upon completion of quest entry

Post by Tony Li »

Glad to help!
Post Reply