Page 1 of 1

Mark Dialogue as NPC to NPC

Posted: Thu Aug 10, 2023 8:34 am
by RyanKonso
Hello,
I would like to highlight dialogues that are NPC to NPC. For dialogues with the PC, a letterbox and a CameraZoom is shown via the "Feel-Plugin", but I don't want to have this with NPC to NPC. I would like to mark the dialogue somehow, but not use the variables of the DialogueManager (because there could be a dialogue with the PC at the same time and then this variable would be set incorrectly). Does DialogueSystem already give me such a possibility to mark the whole dialogue, or how can I implement this functionality most elegantly?

Re: Mark Dialogue as NPC to NPC

Posted: Thu Aug 10, 2023 10:02 am
by Tony Li
Hi,

Yes, you can add a custom field to your conversation template. (See Templates.) You could add a Boolean field that you can set to specify whether the conversation is PC-to-NPC or NPC-to-NPC.

Or you could check the conversation in code in an OnConversationStart(Transform) method. Example:

Code: Select all

void OnConversationStart(Transform actor)
{
    var conversation = DialogueManager.masterDatabase.GetConversation(Dialoguemanager.lastConversationStarted);
    var actor = DialogueManager.masterDatabase.GetActor(conversation.ActorID);
    var conversant = DialogueManager.masterDatabase.GetActor(conversation.ConversantID);
    bool isPlayerToNPC = actor.IsPlayer || conversant.IsPlayer;
}

Re: Mark Dialogue as NPC to NPC

Posted: Thu Aug 10, 2023 11:38 am
by RyanKonso
Oh Gosh, I'm so blind :oops:
Thank you :D

Re: Mark Dialogue as NPC to NPC

Posted: Thu Aug 10, 2023 11:43 am
by Tony Li
Glad to help!