Class: CPhraseDialog
Phrase dialog built or extended from scripts.
Source
C++ class CPhraseDialog
Custom Constructor
CPhraseDialog
Remarks
A phrase dialog is a directed phrase graph. Phrase id "0" is the start phrase used by loaded XML dialogs.
Constructors
Constructor
ts
new CPhraseDialog(): CPhraseDialog;Returns
CPhraseDialog
Methods
AddPhrase()
ts
AddPhrase(
text: string,
phrase_id: string,
prev_phrase_id: string,
goodwill_level: number): CPhrase;Add a phrase to the dialog tree.
Parameters
| Parameter | Type | Description |
|---|---|---|
text | string | Text or string table id. |
phrase_id | string | New phrase id. |
prev_phrase_id | string | Parent phrase id, or an empty string. |
goodwill_level | number | Goodwill value used when the engine orders available replies. |
Returns
Created phrase.
Remarks
prev_phrase_id creates the edge from the previous phrase to the new one. Pass an empty string for a root phrase. Reusing an existing phrase_id returns the existing phrase and still links it from prev_phrase_id.