Hi there,
So here's the situation, I've used Dialogue system for all my projects, and am keen to keep using it for my latest project, but I'm looking to only use the backend and workflow side, all of the UI I intend to deal with myself.
That being said, here's the situation.
I want to control the flow of the conversation via cinemachine using a conversation track and a continueconverstation track.
So far so good, I have that set-up and working if I set the sequence to WaitForMessage(Forever), then just trigger continue conversation in the timeline.
Great, but what I actually want is a way to have that level of control, but also fade this in, display it for an amount of time then fade it out again, so I want to trigger the conversation to start in the timeline, then via some other data in the sequence, know how long to display it before fading it out, then trigger the next node via timeline when I'm ready.
I've been trying to do this via the OnConversationLine and OnConversationLineEnd events, problem is OnConversationLineEnd is never called until we continue the conversationcontinue event in the timeline. I could just use a default amount of time to fade but then I won't have control per line which is what I'd like.
How might I solve this problem?
Cinemachine vs sequences - Specific behaviour
-
- Posts: 91
- Joined: Tue Jul 14, 2015 8:22 am
Re: Cinemachine vs sequences - Specific behaviour
Hi,
You could set the Dialogue Manager's Default Sequence to: Delay(var=duration)
Then, in OnConversationLine() or before, set the DS variable "duration" to a duration in seconds:
Alternatively, if you want to trigger the next node via timeline "when you're ready," it sounds like you'll want to pause the timeline. To do that, set the timeline's speed to 0 in a script. Then, when you're ready, set the speed back to 1.
You could set the Dialogue Manager's Default Sequence to: Delay(var=duration)
Then, in OnConversationLine() or before, set the DS variable "duration" to a duration in seconds:
Code: Select all
public void OnConversationLine(Subtitle subtitle)
{
// Delay 0.5 sec per character:
int textLength = subtitle.formattedText.text.Length;
DialogueLua.SetVariable("duration", textLength * 0.5f);
}