Hi, there.
Is there a way to pause conversation until a user hits a specific custom UI button?
Or end it and start a new conversation?
Pause conversation until custom UI button is clicked?
Re: Pause conversation until custom UI button is clicked?
Hi,
1. Use a continue button.
and configure your UI button's OnClick() event to call a C# script method with this line of code:
There are 2 ways:
1. Use a continue button.
- If you want to do this for all dialogue entry nodes in the conversation, set the Dialogue Manager's Subtitle Settings > Continue Button dropdown to Always.
- If you only want to do it in a specific node, use SetContinueMode() in the node's Sequence, such as:
Code: Select all
SetContinueMode(true); required SetContinueMode(false)@Message(Continue)
Code: Select all
WaitForMessage(MyMessage)
Code: Select all
PixelCrushers.DialogueSystem.Sequencer.Message("MyMessage");
You can configure your custom UI button to run a C# method like this instead:
Code: Select all
using PixelCrushers.DialogueSystem; //<-- Include at top of script.
...
public void SwitchConversation(string newConversation)
{
DialogueManager.StopConversation(); // End the current conversation.
DialogueManager.StartConversation(newConversation); // Start the new conversation.
}
Re: Pause conversation until custom UI button is clicked?
Wow, great customer support. I appreciate this very much. Message system is working fine. Thanks learning here a lot.
Can you answer me one more question?
How can I make it that the last sequence of the dialog is not skippable, unless I send the message to skip it.
Right now if I click directly on the dialog it skips the last sequence without waiting for my message.
Can you answer me one more question?
How can I make it that the last sequence of the dialog is not skippable, unless I send the message to skip it.
Right now if I click directly on the dialog it skips the last sequence without waiting for my message.
Re: Pause conversation until custom UI button is clicked?
To wait for a message, put this in the Sequence field:
where msg is the message to wait for. Send this message using C# code: Sequencer.Message(msg)
However, if you have enabled continue buttons, then the player can still skip ahead by clicking the continue button. To disable the continue button, put this in the Sequence field:
You can combine them in the Sequence:
Code: Select all
WaitForMessage(msg)
However, if you have enabled continue buttons, then the player can still skip ahead by clicking the continue button. To disable the continue button, put this in the Sequence field:
Code: Select all
SetContinueMode(false)
Code: Select all
SetContinueMode(false);
WaitForMessage(msg)