Trigger for On Specific Dialogue End?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
annathehank
Posts: 95
Joined: Sun May 03, 2020 2:17 pm

Trigger for On Specific Dialogue End?

Post by annathehank »

Hi there!

I am trying to do something where once a dialogue conversation ends, a panel will pop up with a little mini-game for the player to play. I want to force the player to have to play it, so I don't want them to go back to the main game until they do. Is there a way to set the dialogue system trigger to enable the panel only when that specific dialogue leading up to it ends? Or a sequence message/variable I can use to trigger it?

Thank you! <3
User avatar
Tony Li
Posts: 22140
Joined: Thu Jul 18, 2013 1:27 pm

Re: Trigger for On Specific Dialogue End?

Post by Tony Li »

Hi,

There are several ways to do this.

1. Let's say you start the conversation using a Dialogue System Trigger. The GameObjects that are assigned to the Dialogue System Trigger's Conversation Actor and Conversation Conversant fields will receive "OnConversationEnd" events. You can add a Dialogue System Events component or another Dialogue System Trigger (this one set to OnConversationEnd) and configure it to enable your minigame.

2. Or use the SetActive() sequencer command in the last node of the conversation. For example, say you minigame panel's GameObject is named "My Minigame". Set the last node's Sequence to something like:

Code: Select all

{{default}}; SetActive(My Minigame)@{{end}}
3. Or use a scene event.
annathehank
Posts: 95
Joined: Sun May 03, 2020 2:17 pm

Re: Trigger for On Specific Dialogue End?

Post by annathehank »

Thank you so much! I was looking at the list of sequencers and didn't fully comprehend the SetActive one, probably because I was skimming too fast :lol: This kind of thing is probably going to happen a lot in the game so certainly good to know the different ways as well.

I appreciate your help! <3
User avatar
Tony Li
Posts: 22140
Joined: Thu Jul 18, 2013 1:27 pm

Re: Trigger for On Specific Dialogue End?

Post by Tony Li »

Happy to help! :-)
Post Reply