Hi,
I managed to run two normal conversations by using override Display settings and two dialogue UI prefabs. But I have trouble focusing on continue state for each. Is there a way to disable continue for first conversation, and instead channel it to continue second conversation?
Second conversation is always same so I can know it's ID or Name.
Questions about Simultaneous Conversations
-
- Posts: 112
- Joined: Tue Jan 19, 2016 11:37 pm
Re: Questions about Simultaneous Conversations
Simultaneous conversations were originally designed to support up to one player-involved conversation (e.g., with response menu, continue buttons, etc.) while other NPC-NPC conversations are active. It's still possible to run multiple player-involved conversations. This Turn Based Multiple Conversation Example is an example of running four simultaneous conversations with four separate dialogue UIs.hellwalker wrote:Hi,
I managed to run two normal conversations by using override Display settings and two dialogue UI prefabs. But I have trouble focusing on continue state for each. Is there a way to disable continue for first conversation, and instead channel it to continue second conversation?
Second conversation is always same so I can know it's ID or Name.
But it doesn't use continue buttons. The default continue button behavior continues everything -- all active conversations. To continue a specific conversation, you'll need to call that conversation's ConversationView.OnConversationContinue() method.
For example, let's say your conversation's ID is in the variable convID. You can do something like this:
Code: Select all
// Find the active conversation record for our conversation:
var records = DialogueManager.Instance.ActiveConversations;
var record = records.Find(r => r.ConversationModel.FirstState.subtitle.dialogueEntry.conversationID == convID);
// Then call its View's OnConversationContinue to continue it:
record.ConversationView.OnConversationContinue();
-
- Posts: 112
- Joined: Tue Jan 19, 2016 11:37 pm
Re: Questions about Simultaneous Conversations
Thanks,
I think this works, but I have run into a second problem. When the second conversation finishes, it also seems to advance first conversation. Is there a way to prevent this?
I think this works, but I have run into a second problem. When the second conversation finishes, it also seems to advance first conversation. Is there a way to prevent this?
Re: Questions about Simultaneous Conversations
Here's an example (based on the previously-linked Turn Based Example) that uses continue buttons. It uses a short script named ConversationContinueButton that lets you configure a continue button to continue a specific conversation by ID. (Inspect each dialogue UI's "Subtitle Continue Button" to see how it's configured.)
ContinueSpecificConversationExample_2017-06-14.unitypackage
If that doesn't help, let me know how your situation is set up. I'll try to put together something similar.
ContinueSpecificConversationExample_2017-06-14.unitypackage
If that doesn't help, let me know how your situation is set up. I'll try to put together something similar.
-
- Posts: 112
- Joined: Tue Jan 19, 2016 11:37 pm
Re: Questions about Simultaneous Conversations
Hey, I recently updated the DS to newest one. Did something change in the way continue function targets conversations?
I was using the code sample you gave me above:
But with update I had to supply dialogue UI to OnConversationContinue(), and now it does not advance the second conversation I targeted with ID.
I was using the code sample you gave me above:
Code: Select all
// Find the active conversation record for our conversation:
var records = DialogueManager.Instance.ActiveConversations;
var record = records.Find(r => r.ConversationModel.FirstState.subtitle.dialogueEntry.conversationID == convID);
// Then call its View's OnConversationContinue to continue it:
record.ConversationView.OnConversationContinue();
Re: Questions about Simultaneous Conversations
Hi,
Sorry; that change isn't documented very clearly. I try to minimize API changes, but this was one of the rare times it was necessary to make continue buttons only continue their specific conversation and not continue all conversations.
Update your script to call this method instead, which doesn't require you to specify a UI:
Sorry; that change isn't documented very clearly. I try to minimize API changes, but this was one of the rare times it was necessary to make continue buttons only continue their specific conversation and not continue all conversations.
Update your script to call this method instead, which doesn't require you to specify a UI:
Code: Select all
record.ConversationView.OnConversationContinueAll();