Hi, first of all thank you for such a great dialogue system, I really enjoy using it.
Sorry if this topic was already discussed - couldn't find an answer.
So, I explore the possibility of positioning the dialogue UI above the speaker's head during each dialogue entry.
I see that you can do that with DialogueSystemEvents OnCovnersationLine event, but is it possible with Response menu (OnCoversationResponseMenu)? The parameters in that method are Response[], where I can not find the transform of the speaker. The static calls to DialogueManager.CurrentConversant do not seem to change during conversation line changes.
BTW, my goal is to make something resembling the comic-book stile bubbles.
Thanks!
Positioning UI on each DialogueEntry
-
- Posts: 3
- Joined: Thu Jul 05, 2018 1:46 am
Re: Positioning UI on each DialogueEntry
Also, is it possible to link unique events to a conversation? E.g. I want to start a battle when conversation "Dialogue1" ends or is cancelled. So I want something like a possibility to mark a conversation as triggering a battle. One idea that i currently have is by convention, so that battle conversation is called like "Battle", and then in Dialoge events check the string name on contains.
Re: Positioning UI on each DialogueEntry
Hi,
Thanks for using the Dialogue System!
1. Assign custom overhead panels to each character. On each character:
If you only have one player, the player actor is usually assigned to DialogueManager.currentActor. So if you want to position the menu above the player instead of The Joker, use DialogueManager.currentActor.
Thanks for using the Dialogue System!
There are two ways to approach this.shinzironine wrote: ↑Thu Jul 05, 2018 1:51 amI explore the possibility of positioning the dialogue UI above the speaker's head during each dialogue entry.
1. Assign custom overhead panels to each character. On each character:
- Add a Dialogue Actor component.
- Set Dialogue UI Settings > Subtitle Panel Number to Custom.
- Assign an overhead style subtitle panel prefab to the Custom Subtitle Panel field. You can start with Dialogue System / Prefabs / Standard UI Prefabs / Templates / Bubble / Bubble Template Standard Subtitle Panel.
- On the player, set Menu Panel Number to Custom and assign an overhead style menu panel prefab such as Bubble Template Standard Menu Panel.
- Adjust the Dialogue Actor component's Y offset values if the bubbles are too high or too low.
- Once you've confirmed that this is working, you can make custom prefabs to replace the bubble templates.
If you only have one player, the player actor is usually assigned to DialogueManager.currentActor. So if you want to position the menu above the player instead of The Joker, use DialogueManager.currentActor.
Here are some other ideas:shinzironine wrote: ↑Thu Jul 05, 2018 2:00 amAlso, is it possible to link unique events to a conversation? E.g. I want to start a battle when conversation "Dialogue1" ends or is cancelled. So I want something like a possibility to mark a conversation as triggering a battle. One idea that i currently have is by convention, so that battle conversation is called like "Battle", and then in Dialoge events check the string name on contains.
- Define a Dialogue System variable named StartBattle. In a dialogue entry node in the conversation, use the Script field's "..." dropdown to set StartBattle true. At the end of the conversation, check if StartBattle is true (for example, using DialogueLua.GetVariable("StartBattle").AsBool and then set it false. If you want to do this without scripting:
- Add a Dialogue System Trigger component to the Dialogue Manager.
- Set the Trigger to OnConversationEnd.
- In the Condition section, check if StartBattle is true.
- In the Action section, set StartBattle back to false, and start the battle -- for example, use the UnityEvent action to connect it to your own script.
- You could add a custom field to the Conversation template. Call it Battle, and set the Type to Boolean. When writing a Battle conversation, set this field true. When the conversation is done, check DialogueLua.GetConversationField(DialogueManager.lastConversationStarted, "Battle").AsBool.
- Or register a Lua function or use the SendMessage() sequencer command to call a method in one of your scripts.
-
- Posts: 3
- Joined: Thu Jul 05, 2018 1:46 am
Re: Positioning UI on each DialogueEntry
Hi Tony,
Thank you for such a detailed answer.
I will implement with some of the ways that you've provided. I am pretty confident that the approaches that you've described will work.
Thanks!
Thank you for such a detailed answer.
I will implement with some of the ways that you've provided. I am pretty confident that the approaches that you've described will work.
Thanks!