Page 1 of 1

How to check if Conversation Node Sequencer ended

Posted: Thu Mar 14, 2024 11:07 am
by Saper
Hi Tony

I have question how to check if Sequencer ended in Conversation Node. I need to start something on start of Dialogue window but not before Sequencer.

Re: How to check if Conversation Node Sequencer ended

Posted: Thu Mar 14, 2024 11:42 am
by Tony Li
Hi,

You can do that right in the sequence. For example, if the first node is something like:
  • Dialogue Text: (blank)
  • Sequence:

    Code: Select all

    SetDialoguePanel(false, immediate); // Hide the dialogue UI
    Fade(stay, 1); // Fade out over 1 second
    Audio(trumpet)@1; // Play trumpet audio clip at 1-second mark
    Fade(in)@2; // Fade in at 2-second mark
    SendMessage(Ready,,speaker)@3; // Call Ready() method on speaker GameObject at 3-second mark
Then it will call the Ready() method on the C# script(s) on the speaker GameObject.

Alternatively, you can run a sequencer command, Lua function (in the Script field) or a scene UnityEvent in the next node.

Otherwise, if you want to know when sequences are done in conversations:
  • Tick the Dialogue Manager's Display Settings > Subtitle Settings > Inform Sequence Start And End.
  • Add an OnSequenceEnd(Transform) method to your Dialogue Manager.

Re: How to check if Conversation Node Sequencer ended

Posted: Mon Mar 18, 2024 6:50 am
by Saper
Hi Tony

If i understand I need to edit Class DialogueManager and add to it method OnSequenceEnd(Transform), yes?

Re: How to check if Conversation Node Sequencer ended

Posted: Mon Mar 18, 2024 12:02 pm
by Tony Li
No - there's never a need to directly modify any Dialogue System scripts.

Make your own script, add it to the Dialogue Manager GameObject, and put the OnSequenceEnd method in your script.

Re: How to check if Conversation Node Sequencer ended

Posted: Mon Mar 18, 2024 3:31 pm
by Saper
Hi Tony

In new script I created method OnSequenceEnd(Transform), and this method is Invoke two times:
- before dialoge window is visible
- and few seconds after

It looks like this method is invoke at the Start and at the end of sequence.

Re: How to check if Conversation Node Sequencer ended

Posted: Mon Mar 18, 2024 3:32 pm
by Tony Li
The first time may be from the <START> node.