NPCLineSkipper.cs
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class NPCLineSkipper : MonoBehaviour
{
public bool skipToPlayerLine = false; //<-- SET TRUE TO SKIP NPC LINES.
void OnConversationLine(Subtitle subtitle)
{
// If speaker is NPC and the next line is also an NPC line, skip ahead by setting the Sequence to Continue():
if (skipToPlayerLine && subtitle.speakerInfo.isNPC && DialogueManager.currentConversationState.pcResponses.Length == 0)
{
subtitle.sequence = "Continue()";
}
}
}