I would like to show dialogue icon on NPC, whenever player unlock a new conversation. So I
write my script by getting variable from DialogueLua to judge showing icon or not. But when I need to change the conversation occurrence conditions, I need to modify both my script and the conversation tree in the database.Is there a better way to accomplish this feature?
Remind players of new conversations
Re: Remind players of new conversations
Hi,
To check if a conversation now has valid entries to show, use DialogueManager.ConversationHasValidEntry(). Example:
To check if a conversation now has valid entries to show, use DialogueManager.ConversationHasValidEntry(). Example:
Code: Select all
public void EnterCave()
{
// Set a Dialogue System variable that the conversation's conditions will check:
DialogueLua.SetVariable("Has Torch", hasTorch);
// If the conversation now has conditions that are true, show the icon:
if (DialogueManager.ConversationHasValidEntry("Dark Cave Conversation"))
{
ShowDialogueIcon();
}
}