Hi, thanks for this great asset.
I have a question about conversation priorities.
I have a NPC prefab. It has Dialogue System Trigger that Barks on use with no condition.
This bark comes from GenericNPCGreet conversation that has generic texts such as "Hi", "Good day", "How are you?" etc.
By this, i wanted that; whenever player clicks (on use) on a Npc, he will not remain unanswered.
But, of course, some npc's have conversations or barks that gives quests or quest tips or something like that. These are naturally more important.
I added another Dialogue System Trigger component to these npcs that starts conversation or barks.
The problem is, although if a npc has an "important" bark, he barks from GenericNPCGreet.
Also, if a npc has a conversation, conversation starts but a warning in console says : Bark triggered, but a conversation is already active
Is it possible to do that; if npc has no other things to say (bark or conversation), bark from GenericNPCGreet?
Thanks in advance.
Conversation Priorities
Re: Conversation Priorities
Hi,
Yes. It depends on how you will determine if the NPC has something to say. Let's say you have two conversations:
Then register that method with Lua.
Then you can set the bark Dialogue System Trigger's Conditions > Lua Conditions to:
Yes. It depends on how you will determine if the NPC has something to say. Let's say you have two conversations:
- "Greetings": Generic barks
- "NPC Dialogue": Conversation whose nodes that are linked from <START> have Conditions on them. It's possible that one or more nodes' Conditions may be true, in which is the conversation has something to say. If none of the nodes' Conditions are true, the NPC has nothing to say and should bark instead.
Code: Select all
bool HasSomethingToSay(string conversationTitle)
{
return DialogueManager.ConversationHasValidEntry(conversationTitle);
}
Then you can set the bark Dialogue System Trigger's Conditions > Lua Conditions to:
Code: Select all
HasSomethingToSay("NPC Dialogue") == false
-
- Posts: 7
- Joined: Wed May 08, 2024 7:49 pm
Re: Conversation Priorities
Thank you very much Tony