Call different ConversationEnd events after specific lines in one Conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ytrevor
Posts: 5
Joined: Wed Jun 15, 2022 11:22 pm

Call different ConversationEnd events after specific lines in one Conversation

Post by ytrevor »

In one conversation, how can I call a ConversationEnd event after a specific line in a conversation? In my attached image I circled the lines in which I'd like to call a separate event after the conversation ends on one of those lines.

There's most likely a way to do it that doesn't involve a ConversationEnd event? The event would have to be called after those specific lines, not when the dialogue starts on that line.
Attachments
Capture.PNG
Capture.PNG (42.43 KiB) Viewed 321 times
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Call different ConversationEnd events after specific lines in one Conversation

Post by Tony Li »

Hi,

You could add an extra node to each conversation branch:

differentEndEvents.png
differentEndEvents.png (23.89 KiB) Viewed 319 times

Leave the Dialogue Text blank. Use the Continue() sequencer command to immediately end the node. And use other sequencer commands or scene events to do stuff. If you use sequencer commands, put "required" in front of them to make sure they run before the Continue() command ends the conversation. You can also use the SetDialoguePanel(false) sequencer command to hide the UI.

The catch with the suggestion above is that the conversation is technically active until these end nodes finish. Another alternative is to add Dialogue System Triggers set to OnConversationEnd to one of the conversation participants (e.g., the NPC). In each ending node, set a DS variable variable. Then set the Dialogue System Triggers' Conditions to check variable values:

endConditionVariables.png
endConditionVariables.png (22.83 KiB) Viewed 319 times
endConditionTrigger.png
endConditionTrigger.png (26.75 KiB) Viewed 319 times
ytrevor
Posts: 5
Joined: Wed Jun 15, 2022 11:22 pm

Re: Call different ConversationEnd events after specific lines in one Conversation

Post by ytrevor »

Thanks for the quick response! I'll try this out ASAP
Post Reply