How to Play Sequences

You can run sequences outside of conversations by using a Sequence Trigger or Dialogue System Trigger, or by calling PixelCrushers.DialogueSystem.DialogueManager.PlaySequence() in your scripts.

The simplest way to play a sequence is to call:

DialogueManager.PlaySequence(sequence);

or use the equivalent visual scripting action.

However, the Dialogue System provides components that make it easy to trigger sequences other ways, such as when a scene starts or when the player targets and "uses" an NPC or other usable GameObject.

This page explains how to set up those components.


Sequence Trigger

A Sequence Trigger starts a sequence with the GameObject when a specified trigger condition occurs, such as when the scene starts, when the NPC is enabled or used, or on a dialogue event such as the end of a conversation.

To make a target GameObject play a sequence when used, set Trigger to OnUse and add a Usable component to the GameObject.

The Dialogue System Trigger is a general-purpose triggering component that, among other functions, can play sequences.

More information: Sequence Trigger, Dialogue System Trigger


Sequence On Dialogue Event

The Start Sequence On Dialogue Event component plays a sequence when it's notified of a dialogue event such as the start or end of a conversation, bark, or sequence.

More information: Start Sequence On Dialogue Event


<< How to Play Barks | How to Display Alerts >>