Hi everyone,
I'm new to this plugin and absolutely blown away! A huge thanks to the developers and community!!
When a dialogue is typewriting on screen, I am also playing a video. I want the choices to appear only after the video is finished. If I write a script that triggers an event on video finish, how can I hook that into the dialogue system?
Apologies if this is documented somewhere, I did a search and didn't find anything.
Thanks!
End dialogue on video finished
Re: End dialogue on video finished
Hi,
Thanks for using the Dialogue System!
Each dialogue entry node will advance when its Sequence has finished. If the node's Sequence field is blank, it will use the Dialogue Manager GameObject's Display Settings > Camera & Cutscene Settings > Default Sequence. (More info: Cutscene Sequences)
To make the node that's playing the video advance only after the video has finished, use the WaitForMessage() sequencer command in the node's Sequence field, which will wait for a message sent by another sequencer command or by the C# method Sequencer.Message(). For example, say you're starting the video by using a SetActive() sequencer command to set a video player GameObject active. Then set the node's Sequence to something like:
In your event that triggers on video finish, use this C# code:
Note: If you require the player to click a continue button to advance the conversation, but you don't want to require the player to click continue on this node, change the Sequence to:
Thanks for using the Dialogue System!
Each dialogue entry node will advance when its Sequence has finished. If the node's Sequence field is blank, it will use the Dialogue Manager GameObject's Display Settings > Camera & Cutscene Settings > Default Sequence. (More info: Cutscene Sequences)
To make the node that's playing the video advance only after the video has finished, use the WaitForMessage() sequencer command in the node's Sequence field, which will wait for a message sent by another sequencer command or by the C# method Sequencer.Message(). For example, say you're starting the video by using a SetActive() sequencer command to set a video player GameObject active. Then set the node's Sequence to something like:
Code: Select all
SetActive(YourVideoPlayer);
WaitForMessage(VideoDone)
Code: Select all
PixelCrushers.DialogueSystem.Sequencer.Message("VideoDone");
Code: Select all
SetActive(YourVideoPlayer);
Continue()@Message(VideoDone)
Re: End dialogue on video finished
Thanks Tony!
Re: End dialogue on video finished
Glad to help!