YaSpeakerComponent¶
Beta
The
YaSpeakerComponent
allows creators to make non-player characters (NPCs) speakable so that players can talk to NPCs using the preset dialogues. Dialogues are displayed when the NPC is interacted with players.Functions¶
number AddCommonDialog(number dialogID, [number triggerDialogID])Beta
Adds a dialogue that is open for all players to the speaker. The dialogue is activated by adding it to the speaker. The dialogSN will be returned by default.
dialogID
The unique identifier of the dialogue.triggerDialogID
The triggerDialogID is used to group UI dialogues.
number AddCommonQuestDialog(number dialogID, number questID, [number triggerDialogID])Beta
Adds an interactable dialogue that is open for all characters to the speaker. The dialogue is activated by adding it to the speaker.
dialogID
The unique identifier of the dialoguequestID
A unique identifier for the quest.triggerDialogID
The triggerDialogID is used to group UI dialogues.
boolean ContainsCommonDialog(number dialogID, [number dialogSN])Beta
Returns true if the current dialogue is contained in the list of the speaker's generic dialogues. Generic dialogues can be interacted with all players.
dialogID
The unique identifier of the dialoguedialogSN
The serial number of the dialogue
boolean RemoveCommonDialog(number dialogID, number dialogSN)Beta
Removes the speaker's generic dialogues.
dialogID
The unique identifier of the dialoguedialogSN
The serial number of the dialogue