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.
dialogIDThe unique identifier of the dialogue.triggerDialogIDThe 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.
dialogIDThe unique identifier of the dialoguequestIDA unique identifier for the quest.triggerDialogIDThe 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.
dialogIDThe unique identifier of the dialoguedialogSNThe serial number of the dialogue
boolean RemoveCommonDialog(number dialogID, number dialogSN)Beta
Removes the speaker's generic dialogues.
dialogIDThe unique identifier of the dialoguedialogSNThe serial number of the dialogue