PixelCrushers.DialogueSystem.DialogueSystemTrigger Class Reference

The Dialogue System trigger is a general-purpose trigger that can execute most Dialogue System functions such as starting conversations, barks, alerts, sequences, and Lua code. More...

Inheritance diagram for PixelCrushers.DialogueSystem.DialogueSystemTrigger:
Collaboration diagram for PixelCrushers.DialogueSystem.DialogueSystemTrigger:

Classes

class  SendMessageAction
 

Public Member Functions

virtual void Awake ()
 
void OnBarkEnd (Transform actor)
 
void OnConversationEnd (Transform actor)
 
void OnSequenceEnd (Transform actor)
 
void OnUse (Transform actor)
 
void OnUse (string message)
 
void OnUse ()
 
void OnTriggerEnter (Collider other)
 
void OnTriggerEnter2D (Collider2D other)
 
void OnTriggerExit (Collider other)
 
void OnTriggerExit2D (Collider2D other)
 
void OnCollisionEnter (Collision collision)
 
void OnCollisionEnter2D (Collision2D collision)
 
void OnCollisionExit (Collision collision)
 
void OnCollisionExit2D (Collision2D collision)
 
void Start ()
 
void OnEnable ()
 
void OnDisable ()
 
void OnLevelWillBeUnloaded ()
 
void OnApplicationQuit ()
 
void OnDestroy ()
 
void TryStart (Transform actor)
 
void TryStart (Transform actor, Transform interactor)
 Sets the quest status if the condition is true. More...
 
void Fire (Transform actor)
 
void ResetBarkHistory ()
 Resets the bark history to the beginning of the list of bark lines. More...
 
void OnRecordPersistentData ()
 Listens for the OnRecordPersistentData message and records the current bark index. More...
 
void OnApplyPersistentData ()
 Listens for the OnApplyPersistentData message and retrieves the current bark index. More...
 

Public Attributes

DialogueTriggerEvent trigger = DialogueTriggerEvent.OnUse
 The trigger that starts the conversation. More...
 
Condition condition
 The conditions under which the trigger will fire. More...
 
bool exclusive = false
 Only start if no other conversation is active. More...
 
string conversation = string.Empty
 The title of the conversation to start. More...
 
Transform conversationConversant
 The conversant of the conversation. More...
 
Transform conversationActor
 The actor to converse with. More...
 
bool skipIfNoValidEntries
 If this is true and no valid entries currently link from the start entry, don't start the conversation. More...
 
bool stopConversationOnTriggerExit = false
 Set true to stop the conversation if the actor leaves the trigger area. More...
 
string barkConversation = string.Empty
 The title of the bark conversation. More...
 
Transform barker
 The barker. More...
 
Transform barkTarget
 The target of the bark. More...
 
BarkOrder barkOrder = BarkOrder.Random
 Specifies the order to run through the list of barks. More...
 
bool allowBarksDuringConversations = false
 Are barks allowed during conversations? More...
 
bool skipBarkIfNoValidEntries
 Skip bark if no valid entries. More...
 
bool cacheBarkLines = false
 If ticked, bark info is cached during the first bark. More...
 
string sequence = string.Empty
 
Transform sequenceSpeaker
 The speaker to use for the sequence (or null if no speaker is needed). More...
 
Transform sequenceListener
 The listener to use for the sequence (or null if no listener is needed). More...
 
bool waitOneFrameOnStartOrEnable = true
 
bool setQuestState = true
 If true, set the quest state. More...
 
string questName
 The name of the quest. More...
 
QuestState questState
 The new state of the quest when triggered. More...
 
bool setQuestEntryState = false
 If true, set the quest entry state. More...
 
int questEntryNumber = 1
 The quest entry number whose state to change. More...
 
QuestState questEntryState
 The new state of the quest entry when triggered. More...
 
string luaCode = string.Empty
 The lua code to run. More...
 
string alertMessage
 An optional gameplay alert message. More...
 
LocalizedTextTable localizedTextTable
 An optional localized text table to use for the alert message. More...
 
float alertDuration = 0
 
SendMessageAction[] sendMessages = new SendMessageAction[0]
 Targets and messages to send when the trigger fires. More...
 
bool useConversationTitlePicker = true
 
bool useBarkTitlePicker = true
 
bool useQuestNamePicker = true
 
DialogueDatabase selectedDatabase = null
 
- Public Attributes inherited from PixelCrushers.DialogueSystem.DialogueEventStarter
bool once = false
 Set true if this event should only happen once. More...
 

Properties

Sequencer sequencer [get]
 Gets the sequencer used by the current bark, if a bark is playing. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PixelCrushers.DialogueSystem.DialogueEventStarter
void DestroyIfOnce ()
 

Detailed Description

The Dialogue System trigger is a general-purpose trigger that can execute most Dialogue System functions such as starting conversations, barks, alerts, sequences, and Lua code.

Member Function Documentation

◆ Awake()

virtual void PixelCrushers.DialogueSystem.DialogueSystemTrigger.Awake ( )
virtual

◆ Fire()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.Fire ( Transform  actor)

◆ OnApplicationQuit()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnApplicationQuit ( )

◆ OnApplyPersistentData()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnApplyPersistentData ( )

Listens for the OnApplyPersistentData message and retrieves the current bark index.

◆ OnBarkEnd()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnBarkEnd ( Transform  actor)

◆ OnCollisionEnter()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnCollisionEnter ( Collision  collision)

◆ OnCollisionEnter2D()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnCollisionEnter2D ( Collision2D  collision)

◆ OnCollisionExit()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnCollisionExit ( Collision  collision)

◆ OnCollisionExit2D()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnCollisionExit2D ( Collision2D  collision)

◆ OnConversationEnd()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnConversationEnd ( Transform  actor)

◆ OnDestroy()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnDestroy ( )

◆ OnDisable()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnDisable ( )

◆ OnEnable()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnEnable ( )

◆ OnLevelWillBeUnloaded()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnLevelWillBeUnloaded ( )

◆ OnRecordPersistentData()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnRecordPersistentData ( )

Listens for the OnRecordPersistentData message and records the current bark index.

◆ OnSequenceEnd()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnSequenceEnd ( Transform  actor)

◆ OnTriggerEnter()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnTriggerEnter ( Collider  other)

◆ OnTriggerEnter2D()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnTriggerEnter2D ( Collider2D  other)

◆ OnTriggerExit()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnTriggerExit ( Collider  other)

◆ OnTriggerExit2D()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnTriggerExit2D ( Collider2D  other)

◆ OnUse() [1/3]

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnUse ( )

◆ OnUse() [2/3]

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnUse ( string  message)

◆ OnUse() [3/3]

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.OnUse ( Transform  actor)

◆ ResetBarkHistory()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.ResetBarkHistory ( )

Resets the bark history to the beginning of the list of bark lines.

◆ Start()

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.Start ( )

◆ TryStart() [1/2]

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.TryStart ( Transform  actor)

◆ TryStart() [2/2]

void PixelCrushers.DialogueSystem.DialogueSystemTrigger.TryStart ( Transform  actor,
Transform  interactor 
)

Sets the quest status if the condition is true.

Member Data Documentation

◆ alertDuration

float PixelCrushers.DialogueSystem.DialogueSystemTrigger.alertDuration = 0

◆ alertMessage

string PixelCrushers.DialogueSystem.DialogueSystemTrigger.alertMessage

An optional gameplay alert message.

Leave blank for no message.

◆ allowBarksDuringConversations

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.allowBarksDuringConversations = false

Are barks allowed during conversations?

◆ barkConversation

string PixelCrushers.DialogueSystem.DialogueSystemTrigger.barkConversation = string.Empty

The title of the bark conversation.

◆ barker

Transform PixelCrushers.DialogueSystem.DialogueSystemTrigger.barker

The barker.

◆ barkOrder

BarkOrder PixelCrushers.DialogueSystem.DialogueSystemTrigger.barkOrder = BarkOrder.Random

Specifies the order to run through the list of barks.

  • Random: Choose a random bark from the conversation.
  • Sequential: Choose the barks in order from first to last, looping at the end.

◆ barkTarget

Transform PixelCrushers.DialogueSystem.DialogueSystemTrigger.barkTarget

The target of the bark.

◆ cacheBarkLines

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.cacheBarkLines = false

If ticked, bark info is cached during the first bark.

This can reduce stutter when barking on slower mobile devices, but barks are not reevaluated each time as the state changes, barks use no em formatting codes, and sequences are not played with barks.

◆ condition

Condition PixelCrushers.DialogueSystem.DialogueSystemTrigger.condition

The conditions under which the trigger will fire.

◆ conversation

string PixelCrushers.DialogueSystem.DialogueSystemTrigger.conversation = string.Empty

The title of the conversation to start.

◆ conversationActor

Transform PixelCrushers.DialogueSystem.DialogueSystemTrigger.conversationActor

The actor to converse with.

If not set, the game object that triggered the event.

◆ conversationConversant

Transform PixelCrushers.DialogueSystem.DialogueSystemTrigger.conversationConversant

The conversant of the conversation.

If not set, this game object. The actor is usually the entity that caused the trigger (for example, the player that hits the "Use" button on the conversant, thereby triggering OnUse).

◆ exclusive

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.exclusive = false

Only start if no other conversation is active.

◆ localizedTextTable

LocalizedTextTable PixelCrushers.DialogueSystem.DialogueSystemTrigger.localizedTextTable

An optional localized text table to use for the alert message.

◆ luaCode

string PixelCrushers.DialogueSystem.DialogueSystemTrigger.luaCode = string.Empty

The lua code to run.

◆ questEntryNumber

int PixelCrushers.DialogueSystem.DialogueSystemTrigger.questEntryNumber = 1

The quest entry number whose state to change.

◆ questEntryState

QuestState PixelCrushers.DialogueSystem.DialogueSystemTrigger.questEntryState

The new state of the quest entry when triggered.

◆ questName

string PixelCrushers.DialogueSystem.DialogueSystemTrigger.questName

The name of the quest.

◆ questState

QuestState PixelCrushers.DialogueSystem.DialogueSystemTrigger.questState

The new state of the quest when triggered.

◆ selectedDatabase

DialogueDatabase PixelCrushers.DialogueSystem.DialogueSystemTrigger.selectedDatabase = null

◆ sendMessages

SendMessageAction [] PixelCrushers.DialogueSystem.DialogueSystemTrigger.sendMessages = new SendMessageAction[0]

Targets and messages to send when the trigger fires.

◆ sequence

string PixelCrushers.DialogueSystem.DialogueSystemTrigger.sequence = string.Empty

◆ sequenceListener

Transform PixelCrushers.DialogueSystem.DialogueSystemTrigger.sequenceListener

The listener to use for the sequence (or null if no listener is needed).

Sequence commands can reference 'speaker' and 'listener', so you may need to define them in this component.

◆ sequenceSpeaker

Transform PixelCrushers.DialogueSystem.DialogueSystemTrigger.sequenceSpeaker

The speaker to use for the sequence (or null if no speaker is needed).

Sequence commands can reference 'speaker' and 'listener', so you may need to define them in this component.

◆ setQuestEntryState

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.setQuestEntryState = false

If true, set the quest entry state.

◆ setQuestState

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.setQuestState = true

If true, set the quest state.

◆ skipBarkIfNoValidEntries

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.skipBarkIfNoValidEntries

Skip bark if no valid entries.

◆ skipIfNoValidEntries

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.skipIfNoValidEntries

If this is true and no valid entries currently link from the start entry, don't start the conversation.

◆ stopConversationOnTriggerExit

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.stopConversationOnTriggerExit = false

Set true to stop the conversation if the actor leaves the trigger area.

◆ trigger

DialogueTriggerEvent PixelCrushers.DialogueSystem.DialogueSystemTrigger.trigger = DialogueTriggerEvent.OnUse

The trigger that starts the conversation.

◆ useBarkTitlePicker

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.useBarkTitlePicker = true

◆ useConversationTitlePicker

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.useConversationTitlePicker = true

◆ useQuestNamePicker

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.useQuestNamePicker = true

◆ waitOneFrameOnStartOrEnable

bool PixelCrushers.DialogueSystem.DialogueSystemTrigger.waitOneFrameOnStartOrEnable = true

Property Documentation

◆ sequencer

Sequencer PixelCrushers.DialogueSystem.DialogueSystemTrigger.sequencer
get

Gets the sequencer used by the current bark, if a bark is playing.

If a bark is not playing, this is undefined. To check if a bark is playing, check the bark UI's IsPlaying property.

The sequencer.


The documentation for this class was generated from the following file: