I want to trigger dialogue base on specific keyframe at specific animation
I can put event on to that specific keyframe to trigger C# function
The problem is, I don't know how to properly use C# function to trigger the dialogue with this system yet.
I watched the tutorial video Dialogue System for Unity 2.x - Cutscene Sequences - Part 3: Messages & Timing
I can use use WaitForMessage(the string) in the Sequence (Trigger set to On Start and dialogue will wait for the message?)
And then I can call one of the function that have this inside
PixelCrushers.DialogueSystem.Sequencer.Message("the string");
Then my dialogue will get trigger, I think.
Any better way to do this? because this can involved a lot of strings.
Best way to trigger dialogue at specific key frame in Unity animation.
Re: Best way to trigger dialogue at specific key frame in Unity animation.
Hi,
Do you want to start a new conversation at a specific keyframe? Or make the current conversation continue at the specific keyframe?
To start a new conversation, you could set up a Dialogue System Trigger and call its OnUse() method in your C# method, or you could manually start it by calling DialogueManager.StartConversation():
To make the current conversation continue, you can simulate a continue button click:
Do you want to start a new conversation at a specific keyframe? Or make the current conversation continue at the specific keyframe?
To start a new conversation, you could set up a Dialogue System Trigger and call its OnUse() method in your C# method, or you could manually start it by calling DialogueManager.StartConversation():
Code: Select all
DialogueManager.StartConversation("Title", actorTransform, conversantTransform);
Code: Select all
public void MyAnimationEvent()
{
(DialogueManager.dialogueUI as StandardDialogueUI).OnContinue();
}