Page 1 of 1

Trigger for On Specific Dialogue End?

Posted: Mon Dec 20, 2021 5:12 pm
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

Re: Trigger for On Specific Dialogue End?

Posted: Mon Dec 20, 2021 8:49 pm
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.

Re: Trigger for On Specific Dialogue End?

Posted: Tue Dec 21, 2021 11:20 am
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

Re: Trigger for On Specific Dialogue End?

Posted: Tue Dec 21, 2021 11:26 am
by Tony Li
Happy to help! :-)