Page 1 of 1

Call different ConversationEnd events after specific lines in one Conversation

Posted: Mon Jun 20, 2022 7:39 am
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.

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

Posted: Mon Jun 20, 2022 8:34 am
by Tony Li
Hi,

You could add an extra node to each conversation branch:

differentEndEvents.png
differentEndEvents.png (23.89 KiB) Viewed 327 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 327 times
endConditionTrigger.png
endConditionTrigger.png (26.75 KiB) Viewed 327 times

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

Posted: Mon Jun 20, 2022 9:32 am
by ytrevor
Thanks for the quick response! I'll try this out ASAP