Linking to Other Conversation and Return

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Linking to Other Conversation and Return

Post by Mchia_Soo »

Hey Tony!

I am currently facing problems with the Conversation Position Stack Functions. I have looked through the forums regarding this function but still don't have any idea of resolving it.

In my dialogue, there are 3 choices, which are ACCEPT, REJECT & CONFLICT. So in CONFLICT, the dialogue will link to another conversation (e.g. title: Choices), where the player will be given choices to choose, before returning back to the original conversation.

I applied PushConversationPosition() in the CONFLICT option and link this dialogue to the Choices Conversation and PopConversationPosition() in the choices of the Choices Conversation.
There's a problem when the dialogue returned from the Choices Conversation to the original one - the option of ACCEPT was displayed (only one option). I was expecting it to continue the conversation instead of starting at the options again.
[As shown in the Testing01.jpg]
Testing01.JPG
Testing01.JPG (35.07 KiB) Viewed 548 times


I tried with another method in the original conversation where I added another empty child node and applied PushConversationPosition() in it right after the CONFLICT option. Link to another conversation was applied to this empty node as well. Everything worked well, wondering if it is a bug. [As shown in the Testing02.jpg]
Testing02.JPG
Testing02.JPG (63.62 KiB) Viewed 548 times


But when I added a new option(None of the Above) in Choices Conversation, whenever the player selected None of the Above, the dialogue will start looping in the Choices Conversation. [As shown in the Dialogue.jpg]
The conversation is fine if the player selects other option, other than None of the Above.
Dialogue.JPG
Dialogue.JPG (17.91 KiB) Viewed 548 times
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Linking to Other Conversation and Return

Post by Tony Li »

Hi,

The conversation stack works best if you put PushConversationStack() on an NPC's line, since it will always try to return to the NPC's line before showing the response menu. This works well for typical RPG conversations where the player might choose to go down a side path when talking to an NPC. Unfortunately your case is slightly different, so the setup is a little more complicated.

Here's a working example (Unity 2019.1):

DS_ConversationStack_AcceptRejectConflict_2019-12-26.unitypackage

The conversation has to look similar to this:

Image

The nodes with <text> are empty nodes with Sequence set to None(). They're used to evaluate conditions. Instead of defining a variable in the Variables section, I just used a local Lua variable that I called choseConflict.
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Linking to Other Conversation and Return

Post by Mchia_Soo »

Alright, it's working. Thanks for the help!!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Linking to Other Conversation and Return

Post by Tony Li »

Happy to help! :-)
Post Reply