1. When the last script is played, I want the code to signal that the conversation is over. Is there a way?
2. I want to change the database of the dialog system to code. Please teach me the way.
I have a question.
Re: I have a question.
You can use an OnConversationEnd() method, or DialogueManager.instance.conversationEnded C# event, or Dialogue System Events component > OnConversationEnd() UnityEvent.
If you only want to change variables and quest states, you can do that inside conversations -- for example, using the Script field -- or in C# using DialogueLua.SetVariable() and QuestLog.SetQuestState().
If you want to create new conversations, see: How To: Create Dialogue Database At Runtime
Re: I have a question.
Can you bring the name of the character you are currently talking about?
It doesn't work well because I write it like this in update ().
string name = this.GetComponent<StandardUISubtitlePanel>().portraitActorName;
Debug.Log(name);
It doesn't work well because I write it like this in update ().
string name = this.GetComponent<StandardUISubtitlePanel>().portraitActorName;
Debug.Log(name);
Re: I have a question.
Hello,
Try:
If the character is the conversation's Actor, use DialogueLua.GetVariable("Actor").asString instead.
Try:
Code: Select all
string name = DialogueLua.GetVariable("Conversant").asString;
Debug.Log(name);