Activate a dialogue trigger when all other triggers have been used?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
CaseyJarmes
Posts: 4
Joined: Fri Feb 11, 2022 3:41 pm

Activate a dialogue trigger when all other triggers have been used?

Post by CaseyJarmes »

I'm working on a murder mystery game and I'd like to have it so, after clicking and examing all of the pieces of evidence in the scene (these pieces of evidence are dialogue system triggers) a new line of dialogue plays that moves the player to the next scene.

Is there a way to have it so a dialogue system trigger activates when a number of other triggers have finished activating? Perhaps setting objectChecked variables on each of the objects in the scene, then having this next one activate when all the variables are true?
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Activate a dialogue trigger when all other triggers have been used?

Post by Tony Li »

Hi,

Yes. Add a variable for each piece of evidence. In each piece of evidence's Dialogue System Trigger, set the variable true.

Add a Dialogue System Trigger to the player GameObject. Set it to OnConversationEnd. Set the Conditions to require that all of the variables are true.

This depends on the player GameObject being used as the Conversation Actor in the Dialogue System Triggers. You can assign the player GameObject manually, or leave Conversation Actor blank and add a Dialogue Actor component to the player GameObject. Set it to Player to associate this GameObject with the player.
CaseyJarmes
Posts: 4
Joined: Fri Feb 11, 2022 3:41 pm

Re: Activate a dialogue trigger when all other triggers have been used?

Post by CaseyJarmes »

Thanks this works perfectly
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Activate a dialogue trigger when all other triggers have been used?

Post by Tony Li »

Glad to help!
Post Reply