Show responses before the end of the default delay
Show responses before the end of the default delay
Hello, I have nice animations for my response buttons, but they take enough time that I want to start them before the end of the usual dialogue delay
I don't want to set Delay(0) on every node before a PC choice, and besides, this command somehow breaks the typewriter animation.
The only somewhat satisfying result was to set every pre-response node sequence to Delay({{end}}/2) followed by a response sequence of Delay({{end}}/2)
I don't want to set Delay(0) on every node before a PC choice, and besides, this command somehow breaks the typewriter animation.
The only somewhat satisfying result was to set every pre-response node sequence to Delay({{end}}/2) followed by a response sequence of Delay({{end}}/2)
Re: Show responses before the end of the default delay
Hi,
Replace your subtitle panel's StandardUISubtitlePanel with this subclass, which doesn't stop the typewriter when advancing to the response menu:
Replace your subtitle panel's StandardUISubtitlePanel with this subclass, which doesn't stop the typewriter when advancing to the response menu:
Code: Select all
public class MenuWhileTypingSubtitlePanel : PixelCrushers.DialogueSystem.StandardUISubtitlePanel
{
public override void FinishSubtitle()
{
HideContinueButton();
}
}
Re: Show responses before the end of the default delay
Clean, elegant, I love it.
Don't know why I was set on using sequences.
Don't know why I was set on using sequences.
Re: Show responses before the end of the default delay
I've set it up as described, but I do not get any different result, unless I manually set every single dialog entries with answers to have a delay of 0.
Is there any way to detect the number of responses in a Sequence ?
Is there any way to detect the number of responses in a Sequence ?
Re: Show responses before the end of the default delay
Hi,
You could modify the Sequence in an OnConversationLine method in a script on your Dialogue Manager. For example, the method below checks if the current subtitle will lead to a response menu. If so, it modifies the Sequence to continue after 1 second:
You could modify the Sequence in an OnConversationLine method in a script on your Dialogue Manager. For example, the method below checks if the current subtitle will lead to a response menu. If so, it modifies the Sequence to continue after 1 second:
Code: Select all
void OnConversationLine(Subtitle subtitle)
{
var state = DialogueManager.currentConversationState;
bool isMenuNext = !state.hasNPCResponse && state.hasPCResponses && !state.hasPCAutoResponse;
if (isMenuNext)
{
subtitle.sequence = $"Continue()@1; {subtitle.sequence}";
}
}
Re: Show responses before the end of the default delay
What's the purpose of the @1 ? To add a minimum delay before the response appears?
Re: Show responses before the end of the default delay
Hi,
Yes, exactly. It simulates clicking the continue button after 1 second.
Yes, exactly. It simulates clicking the continue button after 1 second.
Re: Show responses before the end of the default delay
I found that it causes a lot less issues to run a separate sequencer command:
Code: Select all
public void SkipSubtitleAnimationIfResponses(Subtitle subtitle)
{
ConversationState state = DialogueManager.currentConversationState;
bool isMenuNext = !state.hasNPCResponse && state.hasPCResponses;
if (isMenuNext) SkipSubtitleAnimation();
}
void SkipSubtitleAnimation()
{
string delay = minDelay.ToString(CultureInfo.InvariantCulture);
string continueSequence = $"Continue()@{delay}";
DialogueManager.PlaySequence(continueSequence);
}
Re: Show responses before the end of the default delay
Hi,
What if you just set the Dialogue Manager's Subtitle Settings > Continue Button mode to "Not Before Response Menu"? Or "Optional Before Response Menu" if you want allow the player to click the continue button to skip to the response menu early.
What if you just set the Dialogue Manager's Subtitle Settings > Continue Button mode to "Not Before Response Menu"? Or "Optional Before Response Menu" if you want allow the player to click the continue button to skip to the response menu early.
Re: Show responses before the end of the default delay
No, that would cause more issues.
The continue button would disappear just before that actual part I wanted to skip in the first place.
The continue button would disappear just before that actual part I wanted to skip in the first place.