Related: How To: Bypass Response Menu When Player Has Only One Choice
Sometimes you'll write the player's short paraphrase response in the Menu Text field and an expanded subtitle version in the Dialogue Text field. To show both of these, inspect the Dialogue Manager GameObject. In the Display Settings > Subtitle Settings section, tick Show PC Subtitles During Line and UNtick Skip PC Subtitle After Response Menu.
If you want to skip the subtitle if the text is the same as the menu text, add a script like this to the Dialogue Manager. It makes use of the OnConversationLine script message.
SkipPlayerSubtitleIfSameAsMenu.cs
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class SkipPlayerSubtitleIfSameAsMenu : MonoBehaviour
{
void OnConversationLine(Subtitle subtitle)
{
if (subtitle.speakerInfo.isPlayer && subtitle.dialogueEntry.subtitleText == subtitle.dialogueEntry.responseButtonText)
{
subtitle.formattedText.text = string.Empty;
}
}
}
Code: Select all
subtitle.sequence = "Continue()";