Check if dialogue Line has been said?
Check if dialogue Line has been said?
Im working on procedurally generating things in my game and i would like to know if a specific dialogue line from a specific conversation has been said already at least once. I understand i could be adding a SendMessage on that node and then listen for the message, or setting a variable there, but there is any registry i could just check if it has been said at runtime?
Re: Check if dialogue Line has been said?
I see the reference only mention SimStatus for LUA, there is any way i can check that from code?
Re: Check if dialogue Line has been said?
Yes, use DialogueLua.GetSimStatus(). Example:
or:
Code: Select all
if (DialogueLua.GetSimStatus(someDialogueEntry) == DialogueLua.WasDisplayed)
{
// someDialogueEntry has been said.
}
Code: Select all
// Find a dialogue entry with Title "Quest Accepted" in conversation "Kill Rats":
var conversation = DialogueManager.masterDatabase.GetConversation("Kill Rats");
var dialogueEntry = conversation.dialogueEntries.Find(entry => entry.Title == "Quest Accepted");
if (DialogueLua.GetSimStatus(dialogueEntry) == DialogueLua.WasDisplayed)
{
// someDialogueEntry has been said.
}