Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] Dialogue System for Unity - easy conversations, quests, and more!

Discussion in 'Assets and Asset Store' started by TonyLi, Oct 12, 2013.

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Happy to help!
     
  2. Frax228

    Frax228

    Joined:
    Jul 19, 2016
    Posts:
    43
    hi. how in text input use on screen keyboard?
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @Frax228 - Inspect the dialogue UI's Text Field UI, and tick Show Touch Screen Keyboard:

    upload_2020-9-12_8-52-14.png
     
  4. Frax228

    Frax228

    Joined:
    Jul 19, 2016
    Posts:
    43
    thx for answer. but i need on monitor keyboard. not for touch screen. is there a way to do this?
     
  5. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Sure! The Standard UI Input Field component has OnOpen() and OnClose() UnityEvents that you can configure in the inspector. Configure them to show and hide your onscreen keyboard. The Dialogue System doesn't include an onscreen keyboard asset, but you can find some on the Asset Store or make your own. I've used Marjupi Software's Arcade Keyboard with Standard UI Input Field in a project, and it was fine. But you of course have your choice on the Asset Store or you can use your own.
     
  6. Frax228

    Frax228

    Joined:
    Jul 19, 2016
    Posts:
    43
    ok. I made my own keyboard but I have a problem with the enter button. if it's not difficult, could you tell me how to do it?
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi - Configure your keyboard enter key to call the StandardUIInputField's AcceptTextInput() method.
     
  8. nichjaim

    nichjaim

    Joined:
    Apr 23, 2020
    Posts:
    29
    Hey, sorry I looked in the documentation and I'm probably just missing it but how do you put in an actor's display name within dialogue text.
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @nichjaim - If the actor is the Conversation Actor, use [var=Actor]. If it's the Conversation Conversant, use [var=Conversant]. Usually the Conversation Actor is the player and the Conversation Conversant is the NPC, so an NPC line might look like this:
    • Dialogue Text: "Hello, [var=Actor]! I'm an NPC shopkeeper. My name is [var=Conversant]."
     
    nichjaim likes this.
  10. SigmaVulcan

    SigmaVulcan

    Joined:
    Jun 11, 2015
    Posts:
    3
    Hello. First of all, I am very impressed with your asset and it offers so many possibilities and different kind of systems. It is just a piece of art.

    When I got started with your asset, I found the idea of using lua for dynamic scripting amazing, especially with the integration to all your assets/systems and also to behavior designer. But then I have started using the sequencers more and more. And now I am kind of confused, what is the advantage of one over the other. Why has the sequencer all this functionality and Lua doesn't have access to so many things like Animators, Animations and so on. I am kind of on a tight time schedule for a project and so I am just trying to understand what is feasible as a general approach to script something fast for a prototype. I like both lua and sequencer but right now I can not see much difference anymore. Any explanation would be very much appreciated.
     
  11. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @SigmaVulcan - Thanks for using the Dialogue System!

    There are two reasons for the difference between Lua and sequencer commands.

    The first reason is practical. The Dialogue System is bidrectionally compatible with an external dialogue editor called Chat Mapper. Chat Mapper has Lua, but it doesn't have sequencer commands. By separating Lua and sequences, the Dialogue System can act as a superset of Chat Mapper. Its data does everything that Chat Mapper does and more, and Chat Mapper can still operate on all the data that it's built to recognize.

    The second reason is conceptual. Conceptually, Lua is more often used for internal data, such as variable values and quest states. Sequences, on the other hand, are more often used for user experience (UX) things such as animation and camerawork that the player experiences directly.

    If you need to control activity in a time sequence (e.g., do something at the 1-second mark, do something else at the 2-second mark, etc.), use sequences. You can write custom sequencer commands for anything that's not already built into the Dialogue System.

    If you want to invoke existing C# methods in your conversations, register your C# methods with Lua. (Or use scene events.)
     
    SigmaVulcan likes this.
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    flashframe likes this.
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Dialogue System for Unity 2.2.10 Released!

    Version 2.2.10 of the Dialogue System for Unity is now available on the Asset Store. This version updates and improves many third party integrations and adds support for Lively Chat Bubbles and Opsive's Ultimate Inventory System. The UIS integration will be available on opsive.com with Opsive's next update of their assets.


    Release Notes:

    Core:
    • Improved: CSV export/import now includes actor portrait sprites.
    • Improved: Optimized commonly-used Delay() sequencer command.
    • Improved: Addressables loaded via Audio() sequencer command and DialogueManager.LoadAsset() are now unloaded when scene changes by default.
    • Improved: SetDialoguePanel() retains content when used to hide and show during same dialogue entry.
    • Improved: InputDeviceManager improved mouse movement tracking to determine when to switch to mouse mode.
    • Fixed: SetContinueMode() didn't apply when using conversation overrides.
    • Fixed: Bug where subtitle panel would clear text while playing hide animation.
    • Fixed: DialogueSystemSaver issue that prevented restoration of relationship data and compressed SimStatus data.
    • Fixed: Welcome window's Enable TextMesh Pro checkbox didn't work on OSX.
    • Fixed: When GameTime.mode is Realtime, GameTime.deltaTime returns unscaled delta time.
    • Fixed: When changing actor custom node color, new color is immediately reflected when returning to Conversations section.
    • Save System: Fixed AutoSaveLoad save issue; added option to automatically unload any additively-loaded scenes when changing scenes.
    Third Party Support:
    • Adventure Creator: Fixed package; version in 2.2.9 was missing action scripts.
    • articy:draft: Stage Directions as Sequences now also converts Stage Directions fields that contain only shortcuts; Dialogues can now specify Sequence for <START> entry.
    • Chat Mapper: Importer now imports additional portrait images; can now specify sprite or texture image format.
    • Invector: Updated InvectorInventorySaver to prevent double equip animation in Invector 2.5.3+ and generally improve equipment save/load.
    • Lively Chat Bubbles: Added support.
    • Opsive Character Controllers: Updated for UCC 2.2.5.
    • Opsive Ultimate Inventory System: Added support.
    • PlayMaker: Added speaker & listener info to Get Current Conversation Info.
    • Rewired: InputDeviceManagerRewired now recognizes negative button input as well as positive.
    • RT-Voice: Updated for version 2020.4.2.
     
  14. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    Hi there i really need your help to get this done.
    How can i popup the dialogue beside the npc character (actor).
     
  15. Mythran

    Mythran

    Joined:
    Feb 26, 2013
    Posts:
    59
    Is there a tutorial on npc characters talking to each other?
    When will a discord channel rise?
     
    Last edited: Sep 18, 2020
  16. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @goutham12 - What do you mean? If you mean popup dialogue bubbles, see this forum article. It talks about showing the dialogue bubble over the NPC's head, but you can just as easily put it beside the NPC.

    Hi Mythran - Please see the same link as above. To make NPC characters talk to each other, assign the NPCs as the speakers of the nodes. If there are no player nodes (blue), the NPCs will continue to speak on their own.

    If you want them to be able to continue their conversation in the background while the player is engaged in another conversation, you'll need to allow simultaneous conversations. In this case, inspect the Dialogue Manager and tick Other Settings > Allow Simultaneous Conversations.

    We already have a discord server. It's in the README. Here's a link: https://discord.gg/FwUaCNt
     
    Banky likes this.
  17. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    Hi, there Am working on bubble speach conversation. for that the components i added for the npc
    *Usable
    *Dialogue system trigger
    *Dialogue Actor

    I have more than one NPCs which are using same custom subtittle panel.
    The problem is when i triggered any npc the dialogue is poping at first npc character only. i don't understand what am doing wrong.

    I checked the conversation actor field also, they are indipendent. can you help me here to get this done.
     
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @goutham12 - If you're using popup UIs, use a separate one for each character. Make each one a child of its NPC.
     
  19. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    Did the same as you said. but i got the same result. please find inspector snaps for two characters.
     

    Attached Files:

  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    I'm out of the office right now, but I'll take a look as soon as I return.
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    I see that ScrappyJane's UI is inactive. What happens if you activate it before playing?

    Also, make sure your Dialogue Manager GameObject's Dialogue UI field points to a Standard Dialogue UI such as 'Basic Standard Dialogue UI'.

    Here's an example with 2 NPCs and a player. All 3 characters use their own panels.
     

    Attached Files:

  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Dialogue System 2.2.11 Released - Bug Fix for 2.2.10 Available

    Version 2.2.11 has been submitted to the Asset Store and should be available in a few business days. It fixes a bug introduced in version 2.2.10 with the Delay() sequencer command when the Dialogue System Trigger's Pause Game During Conversation checkbox is ticked.

    If you're using version 2.2.10, you can download a patch from the Dialogue System Extras page. (direct download link)
     
  23. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    233
    Hey quick question, I'm using Dialogue System with the UCC integration. I have the "Detach Checkbox" selected and initially the camera does detach itself and allows for sequencing of the camera, but after a few nodes something seems to break this before the conversation completes. The character is then still conversing, but the camera controller reactivates and then player movement input which was initially disabled becomes reactivated
     
  24. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @DespairBear - UCC may be receiving a message from somewhere to regain control control. Does it always happen at the same point in the conversation? If so, what happens at that point? If it doesn't happen at the same point, is there always something in common happening in the background?
     
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Dialogue System 2.2.11 On Asset Store + Ultimate Inventory System Integration Available

    Version 2.2.11 is now available on the Asset Store.

    Up-to-date integration for Opsive's Ultimate Inventory System is now available on Opsive.com.
     
  26. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    233
    It doesn't seem to happen at any particular point in the conversation, seems to happen after a certain period of time of being in the conversation. There's no external events that could be being triggered as far as I'm aware because I have a clean scene specifically for testing and writing out the "script".

    Maybe it's something with how I'm using the camera command? Currently, at each node in the conversation I am executing the following sequence:
    Code (CSharp):
    1. Camera(Full Right,listener, 3)@{{end}};
    Essentially just looking to change the camera angle to focus on the speaker for each node
     
    Last edited: Sep 23, 2020
  27. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    hey a quick question. Am working on question and answer. i want to give some delay between questions to do some actions and also i need to change the responce button sprite to red if it is wrong green if it is right how can i do it.
     
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi! Please try updating to the latest Dialogue System integration available on Opsive's download site.

    While in the conversation, double check that the player's UltimateCharacterLocomotion component's Converse state is active and that the CameraController and CameraControllerHandler components are disabled. (The Converse state disables these components during conversations.)

    Alternatively, assign a separate camera to the Dialogue Manager's Camera & Cutscene Settings > Sequencer Camera field. Conversations will disable the UCC camera and use this sequencer camera instead. You can assign a prefab or a camera GameObject in the scene. Another advantage of this approach is that you can put different post processing effects on the sequencer camera such as a stronger depth of field effect to blur the background and help focus the player's attention on the participants.


    Use the Delay() sequencer command to delay. Or, if the actions are external to the conversation, you can use the WaitForMessage() sequencer command or @Message() syntax to wait for a message from the external process. When the external process is done, it can send a message to the sequencer. For example, say your node's Sequence is:
    Code (csharp):
    1. SetDialoguePanel(false); // Hide the dialogue UI.
    2. required SetDialoguePanel(true)@Message(WipedScreen)
    and you have a C# method that does a screen wipe. At the end of this C# method, send the sequencer message:
    Code (csharp):
    1. void WipeScreen()
    2. {
    3.     ...
    4.     PixelCrushers.DialogueSystem.Sequencer.Message("WipedScreen");
    5. }
    At what point do you want to change the color of the response button? When the player clicks it?
     
  29. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    Yes.. when player clicks on response button that i need to change sprite .
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    If you need to change the sprite of the response button itself, make a subclass of StandardUIResponseButton. Override the OnClick() method to change the sprite. Then use your subclass on your buttons instead of StandardUIResponseButton.

    If you need to change some other sprite when the player clicks the response button, it's easier. Add a scene event, sequencer command, or Lua function to the response node.
     
  31. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    233
    I believe I'm already on the latest version. I looked at the Converse and related scripts and diff'ed them and there were no changes to what I have in my project. It looks like the camera components are getting re-enabled mid conversation and I can't identify where or why this happening. It looks like somehow the Converse ability is being stopped but the abstract nature of UCC makes it difficult for me to identify where this is happening exactly. In the log info for Dialogue System this is what it shows:

    Code (CSharp):
    1. Dialogue System: Buckets Main Camera.CameraControllerHandler.enabled = True
    2. UnityEngine.Debug:Log(Object)
    3. PixelCrushers.DialogueSystem.Tools:SetComponentEnabled(Component, Toggle) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Utility/Tools.cs:539)
    4. Opsive.UltimateCharacterController.Character.Abilities.Converse:AbilityStopped(Boolean) (at Assets/Pixel Crushers/Dialogue System/Third Party Support/Opsive UCC Support/Scripts/Character/Abilities/Converse.cs:96)
    5. Opsive.UltimateCharacterController.Character.Abilities.Ability:StopAbility(Boolean, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Ability.cs:692)
    6. Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:TryStopAbility(Ability, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1447)
    7. Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:TryStartAbility(Ability, Boolean, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1099)
    8. Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:TryStartAbility(Ability, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1057)
    9. Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:TryStartAbility(Ability) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1046)
    10. Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateAbilities(Ability[]) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:775)
    11. Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdateUltimateLocomotion() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:716)
    12. Opsive.UltimateCharacterController.Character.CharacterLocomotion:Move(Single, Single, Single) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:477)
    13. Opsive.UltimateCharacterController.Game.KinematicCharacter:Move(Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:226)
    14. Opsive.UltimateCharacterController.Game.KinematicObjectManager:Update() (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:805)
     
    Last edited: Sep 23, 2020
  32. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    @DespairBear - Try bringing the Converse ability closer to the top of the list in UltimateCharacterLocomotion. This increases its priority so that it can't be superceded by lower-priority abilities.
     
  33. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    233
    That did it, fantastic thank you. Gonna try and figure out which ability was trying to override
     
    TonyLi likes this.
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Dwerve on Kickstarter - Ending Soon

    The Kickstarter for Dwerve, made with the Dialogue System for Unity, has just 10 hours left. They're thisclose to reaching the Nintendo Switch stretch goal. If you like beautiful pixel art, dungeon crawlers, or tower defense, consider checking it out and backing it. There are all kinds of reward tiers, including an art book, SNES-style box and manual, and apparel.

     
  35. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    Hi,am working on question and answer conversation. i want to pause the dialogue ui whenever player clicks on response button not hidding the dialogue ui. am attatching three images for better under standing. i need to visually show to the user whether it is correct or not. [/ATTACH] qus_def.PNG incorrect.PNG
     

    Attached Files:

  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @goutham12 - You can either provide a custom dialogue UI script (implementing IDialogueUI) or make these changes to your Standard Dialogue UI:
    • Inspect the response menu panel, clear the Hide Animation Trigger field, and untick Deactivate On Hidden.

    • Add a script with an OnConversationLine method to the Dialogue Manager.
      • In the OnConversationLine method, check if the answer is correct or incorrect. (You can add a custom Boolean field to your dialogue entry template called "Correct" to indicate whether it's a correct answer or not.)
      • If the answer is correct, change the subtitle panel's color to green, and change the response button's image color to green. If it's incorrect, change them to red.
     
  37. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    I can able change the response button color. but can't able to change the subtittle bg color. since whenever i clicks on response button the subtittle text changig it's text to the next sequence.

    I want to dialogue panel to no go to the next sequence immediatly i need some delay to go to the next sequence.
    how can i do this
     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    The next subtitle should be "CORRECT" or "INCORRECT", not the next question.
     
  39. goutham12

    goutham12

    Joined:
    Jul 14, 2016
    Posts:
    53
    H8, instead of delay to the subtittle text... is there a way that pause the subtittle text for some time and continue on my choice...
    Definitely you will have this subtittle text should pass on to another when it gets message only.
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @goutham12 - Sure. All of the relevant Standard Dialogue UI methods are overrideable so you can do whatever you want if you don't want to use any of the suggestions above. Or you can implement IDialogueUI in your own script if you dont want to use Standard Dialogue UI at all. It's entirely up to you how you want to do it.
     
    Last edited: Sep 27, 2020
  41. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    105
    Hi, I am using latest version Version 2.2.11.

    I setup localized display name for my actors, I am using i2localization, import to and from i2 localization works, proper field are created such as "Display Name en", but when I go to the game, the name still show up as field from Name, not display name, so I debugged a bit and found that the Luatable doesn't contain any display name field that is added. help me.
     

    Attached Files:

  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Hi @peeka - It will be much easier to check for "Display Name en" in the Dialogue Editor. Example:

    upload_2020-9-28_9-0-41.png

    If you don't see it there, then you won't see it in Lua unless you're adding the field at runtime.

    In the DS To i2 window, make sure you've specified to localize Display Name:

    upload_2020-9-28_9-5-0.png
     
  43. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    105
    I have all that setup correctly, and the data still don't show up in lua. screenshot is my actor setup screen.

    is it possible something is not saving to lua? how does the data get into lua in the first place?
     

    Attached Files:

  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    When the Dialogue System loads a dialogue database into memory, it puts that information into Lua. Is the correct database assigned to the Dialogue Manager's Initial Database field?

    upload_2020-9-29_8-50-2.png

    At runtime, you can use the Watches tab to view Lua values:

    upload_2020-9-29_8-50-23.png

    (Note the underscores.)

    You can also use a Lua Console, which is useful in builds.

    Have you set the current language to "en" or "zh-CN"?

    Note that the Dialogue System stores the player's current language choice in PlayerPrefs. If you're not seeing the correct language when you play, click Reset Language PlayerPrefs:

    upload_2020-9-29_8-53-13.png

    or set the language using any of these methods.
     
  45. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Crossing Souls Physical Cartridges Now Available

    FourAttic, the devs of Crossing Souls, made with the Dialogue System for Unity and available on Steam, Switch, and PS4, just released some cool physical merchandise, including cartridges for Switch and PS4. (store)

    upload_2020-9-30_15-2-35.png
     
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Elmarion: Dragon Time On Sale

    Dialogue System-powered game Elmarion: Dragon Time, currently in Early Access on Steam and rated Very Positive, is in a Steam sale right now for 40% off.

     
  47. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    105
    Hi I tried all the step, and nothing works. my dialogue system is pointing to correct database.

    here is a screen cap during run time of the watch and actor in inspector.

    any other idea?
     

    Attached Files:

  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Does your database have two actors named SupplyNPCShop?

    Can you please send a copy of your database to tony (at) pixelcrushers.com or in a private message?
     
  49. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    233
    Quick question here, is it possible to trigger another conversation from within a conversation?
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,122
    Yes. First, keep in mind that you can link from one conversation to another. So you might not actually have to end the first conversation and start a second one. To link a node to another conversation, inspect the node. From the "Links To:" dropdown, select "(Another Conversation)".

    However, if that's not what you want to do, you can still trigger a second conversation from within a conversation.

    If you've allowed simultaneous conversations:

    upload_2020-10-4_9-30-4.png

    then you can trigger it while the current conversation is active. One way is to use scene events (tutorial). Set up another Dialogue System Trigger set to OnUse that starts the second conversation. Then use a scene event to call its OnUse method:

    upload_2020-10-4_9-34-18.png

    If you're not allowing simultaneous conversations, here are two suggestions:

    1. Use OnConversationEnd. In the original conversation, set a DS variable:

    upload_2020-10-4_9-42-26.png

    (You can skip the variable if you know you'll always start the second conversation after the first.)

    On the same GameObject, so it receives the OnConversationEnd event, add another Dialogue System Trigger set to OnConversationEnd. If the variable is set, start the second conversation:

    upload_2020-10-4_9-45-21.png

    (You'll probably want to reset the variarable back to false. You can use Actions > Run Lua Code to do this.)

    2. Or queue conversations in a script. Add a script to the Dialogue Manager. Write a method that lets you queue up conversations. When a conversation ends, check if another is waiting in the queue. If so, start it. Register the method with Lua so you can use it in dialogue entry nodes' Script fields:

    upload_2020-10-4_9-47-37.png

    Code (csharp):
    1. public class ConversationQueue : MonoBehaviour
    2. {
    3.     public Queue<string> queuedConversations;
    4.  
    5.     void Awake()
    6.     {
    7.         Lua.RegisterFunction("QueueConversation", this, SymbolExtensions.GetMethodInfo(() => QueueConversation(string.Empty)));
    8.     }
    9.  
    10.     void QueueConversation(string title)
    11.     {
    12.         if (!DialogueManager.isConversationActive)
    13.         {
    14.             DialogueManager.StartConversation(title);
    15.         }
    16.         else
    17.         {
    18.             queuedConversations.Add(title);
    19.         }
    20.     }
    21.  
    22.     void OnConversationEnd(Transform actor)
    23.     {
    24.         if (queuedConversations.Count > 0)
    25.         {
    26.             DialogueManager.StartConversation(queuedConversations.Dequeue());
    27.         }
    28.     }
    29. }
     
unityunity