Class: DialogueManager

DialogueManager


new DialogueManager()

The DialogueManager is shared by all mods and the game. Any names added to the list will be available for everyone to use.

Source:

Methods


addDialogueTree(id)

Parameters:
Name Type Description
id string
Source:
Returns:
Type
DialogueTree

addName(id, name)

Adds a new name to the list

Parameters:
Name Type Description
id string
name
Source:

getDialogueTree(id)

Parameters:
Name Type Description
id string
Source:
Returns:
Type
function

getName(id)

Get the full name of the character using the characterID

Parameters:
Name Type Description
id string
Source:
Returns:
Type
string

playDialogue(id [, branchID])

Parameters:
Name Type Argument Description
id string
branchID string <optional>
Source:
Returns:
Type
Promise.<any>

popUpBoard(text [, type])

A popUpBoard is the message board that pops up and you either press "okay" or "yes/no"

Parameters:
Name Type Argument Default Description
text string

Text to display in the box

type boolean <optional>
false

Set to true for a "yes/no" pop up board. It will return a boolean if set to true.

Source:
Returns:

Promise


removeDialogueTree(id)

Parameters:
Name Type Description
id
Source:
Returns:
Type
DialogueManager

removeName(id)

Parameters:
Name Type Description
id string
Source:

Searches through all of the dialogues to find a string

Parameters:
Name Type Description
string string
Source:
Returns:
Type
Array.<object>

talk(characterID, dialogueText [, emotion])

This is a quick way to make a character say something without creating a dialogue

Parameters:
Name Type Argument Default Description
characterID String

The ID of the character

dialogueText String

The text to put in the dialogue box

emotion GirlManager.facialExpression <optional>
"Neutral"
Source:
Returns:

Promise