Wait for quest/variable completion/state

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mindjak
Posts: 1
Joined: Fri May 14, 2021 4:32 am

Wait for quest/variable completion/state

Post by mindjak »

Hello, I tried to find a solution on the forum but unfortunately couldn't find any.

Is there a way where I could tell the system to wait with the conversation until a quest/variable reaches certain state?
It would be an equivalent to the WaitForMessage() in the sequencer, but I would need something like a WaitForVariable(), or WaitForQuestStatus().

Currently I could track the quest outside of the system and then send a message to push the conversation further, but that would require me to create the quest outside of the dialogue system and thus making the quest functionality not usable. It would be nice to be able to do everything right in the asset.

In order to understand my goal, I am making a VR app which has something like the robot from portal game. Showing you what to do, and I need to have a small tutorial sequence where I tell the player to i.E teleport 3 times. I dont want to have the conversation stopped during that, I would like the robot to wait for the player to finish the quest, then proceed further with next instructions.

If you have any suggestions how to achieve that it would be great, thanks!
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Wait for quest/variable completion/state

Post by Tony Li »

Hi,

Use the WaitForMessage() sequencer command. (Example)

Set a conversation node's Sequence to something like: WaitForMessage(CompletedQuest)

When the player completes the quest, use this line of C# code:

Code: Select all

PixelCrushers.DialogueSystem.Sequencer.Message("CompletedQuest");
You can use an OnQuestStateChange() method to know when the quest state has changed.
Post Reply