All Classes Namespaces Functions Variables Enumerations Enumerator Properties
DiaQ.DiaQNode_Dlg Class Reference

A dialogue/ conversation node. Shows text and wait for an option to be chosen. Use plyGraphManager.SendDataToNode(a_number_strating_at_0) to send a response to this node when it is waiting. So, the first response is (0), the seconds response is (1), the 3rd (2), etc. More...

Inherits plyCommon.plyNode.

Public Member Functions

override string PrettyName ()
 
override void OnAddedToGraph ()
 
override void CopyTo (plyNode n)
 
override int Enter ()
 
override int Update ()
 
override void ReceiveData (object data)
 
DiaQuest LinkedQuest ()
 Returns the quest linked to this dialogue node. Null if no quest is linked or the quest could not be found. More...
 
string ParsedDialogueText (bool inludeLinkedQuestText)
 Return parsed text. The inline values will be inserted if any present in text. More...
 
string ParsedResponseText (int idx)
 Return parsed response text. The inline values will be inserted if any present in text. More...
 
- Public Member Functions inherited from plyCommon.plyNode
void Awake (plyGraph owningGraph)
 called by graph's Awake at runtime More...
 
void LogError (string message)
 show an error message that include the name of the node the error occurred in More...
 
void LogWarning (string message)
 show w warning message that include the name of the node the error occurred in More...
 
virtual int InitOutlinkCount ()
 This should return the number of out links that the node should be initialized with when first added to the graph. More...
 
Dictionary< string, plyMetaDataAllMetaData ()
 
List< plyMetaDataAllMetaDataList ()
 
plyMetaData GetMetaData (string name)
 Return reference to meta data object. Null if not found. More...
 
object GetMetaDataValue (string name)
 Return meta data value. Null if named meta data not found. More...
 
void SetMetaDataValue (string name, object val)
 Set meta data value. Will create the named meta data if not found and then set value. More...
 

Public Attributes

string dialogueText = ""
 The raw dialogue text to show More...
 
int linkedQuestId = -1
 The quest that is linked to this dialogue. Useful when info of a quest will be shown to the player and then wait for him to accept or reject the quest. More...
 
string[] responses = { "" }
 The possible responses/ choices. These are tied to the outLinks. More...
 
- Public Attributes inherited from plyCommon.plyNode
plyNode[] outLinks = new plyNode[0]
 The nodes that are linked to this one's outputs More...
 
int[] outLinkIds = new int[0]
 Ids of the nodes that are linked to. This and the outLinks array should always be of the same size. More...
 
int id = -1
 Unique identifier for node. Do not set this manually. The graph editor updates it as needed. More...
 
string customIdent = ""
 A custom identifier you may use to identify the node by More...
 
string comment = ""
 Node comment. Normally used as messages/ reminders in the graph editor More...
 
bool showComment = true
 Set true if comment should appear in the graph editor More...
 
plyMetaData[] metaData = new plyMetaData[0]
 Meta data is optional data/ information that the designer may associate with the node. Do not access at runtime. Use the provided functions. More...
 
Rect __rect = new Rect()
 Used by editor. You may update width/ height with the node window's size but should not change x and y as that is used to track the position of the node in the graph editor. More...
 

Additional Inherited Members

- Public Types inherited from plyCommon.plyNode
enum  ReturnCode { ReturnCode.Continue = -1, ReturnCode.WaitingForData = -2, ReturnCode.Stop = -3 }
 Return codes used in Enter(), Update(), etc More...
 
- Properties inherited from plyCommon.plyNode
int __outlinks_offset [get, set]
 
object __node_ed [get, set]
 
plyGraph owningGraph [get, set]
 The (runtime) Graph that owns this node More...
 
Dictionary< string, plyMetaDataruntimeMetaData [get, set]
 

Detailed Description

A dialogue/ conversation node. Shows text and wait for an option to be chosen. Use plyGraphManager.SendDataToNode(a_number_strating_at_0) to send a response to this node when it is waiting. So, the first response is (0), the seconds response is (1), the 3rd (2), etc.

Member Function Documentation

DiaQuest DiaQ.DiaQNode_Dlg.LinkedQuest ( )

Returns the quest linked to this dialogue node. Null if no quest is linked or the quest could not be found.

string DiaQ.DiaQNode_Dlg.ParsedDialogueText ( bool  inludeLinkedQuestText)

Return parsed text. The inline values will be inserted if any present in text.

string DiaQ.DiaQNode_Dlg.ParsedResponseText ( int  idx)

Return parsed response text. The inline values will be inserted if any present in text.

Member Data Documentation

string DiaQ.DiaQNode_Dlg.dialogueText = ""

The raw dialogue text to show

int DiaQ.DiaQNode_Dlg.linkedQuestId = -1

The quest that is linked to this dialogue. Useful when info of a quest will be shown to the player and then wait for him to accept or reject the quest.

string [] DiaQ.DiaQNode_Dlg.responses = { "" }

The possible responses/ choices. These are tied to the outLinks.