Unique conversations and loopable final conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Unique conversations and loopable final conversation

Post by rauljl1 »

Hi Tony.
Usually in games, for example Elden Ring or Dark Souls, an NPC has many conversations.
When you finish a conversation with an NPC and talk to him again, a different conversation starts and this can be repeated until the last conversation. The last conversation is the one that loops.

Basically, now I just have that "last" conversation loopable. How can I make previous conversations no longer accessible once they have been played and only the last conversation is loopable?
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unique conversations and loopable final conversation

Post by Tony Li »

User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Re: Unique conversations and loopable final conversation

Post by rauljl1 »

Hi, Tony. One question more. I add a "Shuffle Responses" component to my Dialogue Manager. It works perfectyl, but I want some dialogues without shuffle. How do I do it?

And... how to call Scene Event after some time or delay?
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unique conversations and loopable final conversation

Post by Tony Li »

You could add a custom field to your dialogue entry template to specify whether it should shuffle the responses or not. (See Template.) In an OnConversationResponseMenu() method, check the current dialogue entry's field. Example:

Code: Select all

void OnConversationResponseMenu(Response[] responses)
{
    var currentEntry = DialogueManager.currentConversationState.subtitle.dialogueEntry;
    if (Field.LookupBool(currentEntry.fields, "Shuffle))
    {
        // (Shuffle responses)
    }
}
Scene Events run immediately. If you want to do something after a delay, use sequencer commands. (See Cutscene Sequence Tutorials.)
User avatar
rauljl1
Posts: 55
Joined: Fri Apr 15, 2022 7:40 pm

Re: Unique conversations and loopable final conversation

Post by rauljl1 »

thanks ;)
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unique conversations and loopable final conversation

Post by Tony Li »

Glad to help!
Post Reply