Page 1 of 1

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

Posted: Wed Mar 09, 2022 5:12 pm
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?

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

Posted: Wed Mar 09, 2022 8:20 pm
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.

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

Posted: Fri Mar 11, 2022 5:47 pm
by CaseyJarmes
Thanks this works perfectly

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

Posted: Fri Mar 11, 2022 9:12 pm
by Tony Li
Glad to help!