Skip to content

YaCharacterDialog

Beta
YaCharacterDialog is an object representing dialogues on speakers.

Functions

boolean IsValid()Beta
Returns true if the struct is valid.
number AddDialogWithQuestID(number dialogID, number questID, number speakerID, [number customTriggerID])Beta
Adds a dialogue with a quest to a speaker.
  • dialogID The unique identifier of the dialogue
  • questID The unique identifier of the quest
  • speakerID The EntityID of the speaker
  • customTriggerID Used to group UI dialogues
number AddDialog(number dialogID, number speakerID, [number customTriggerID])Beta
Adds a dialogue to a speaker.
  • dialogID The unique identifier of the dialogue
  • speakerID The EntityID of the speaker
  • customTriggerID Used to group UI dialogues
boolean ContainsDialog(number dialogSN)Beta
Returns true if the speaker contains an interactable dialogue.
  • dialogSN The serial number of the dialogue
boolean RemoveDialog(number dialogSN)Beta
Removes an interactable dialogue for the speaker.
  • dialogSN The serial number of the dialogue
number GetDialogsCount(number speakerID)Beta
Gets the number of interactable dialogues on the speaker.
  • speakerID The EntityID of the speaker
YaDialogData[] GetDialogs(number speakerID)Beta
Gets the dialogue list of interactable dialogues on the speaker.
  • speakerID The EntityID of the speaker
boolean TryAddCompletedDialog(number dialogID, number speakerID, number dialogSN)Beta
Records the finished dialogue for a speaker.
  • dialogID The unique identifier of the dialogue
  • speakerID The EntityID of the speaker
  • dialogSN The serial number of the dialogue
boolean ContainsCompletedDialog(number dialogSN)Beta
Returns true if the dialogue is finished for the speaker.
  • dialogSN The serial number of the dialogue
boolean ContainsCompletedDialogByAny(number dialogID)Beta
Returns true if the speaker has completed the dialogue.
  • dialogID The unique identifier of the dialogue
boolean RemoveCompletedDialog(number dialogSN)Beta
Removes the completed dialogues recorded on the speaker.
  • dialogSN The serial number of the dialogue
void EnterDialogState(number dialogID, number speakerID, number dialogSN, [number customTriggerID])Beta
Enters a dialogue with a speaker.
  • dialogID The unique identifier of the dialogue
  • speakerID The EntityID of the speaker
  • dialogSN The serial number of the dialogue
  • customTriggerID Used to group UI dialogues
void SelectOption(number dialogSN, number sentenceID, number optionID)Beta
Selects an option in the current dialogue.
  • dialogSN The serial number of the dialogue
  • sentenceID The unique identifier of the sentence
  • optionID The unique identifier of the option
YaDialogSelectOption[] GetSelectOptions()Beta
Gets all options of the speaker. Call it in the dialogue end event.
void ExitDialogState()Beta
Interrupts the dialogue of the speaker.
void DialogStateEnds()Beta
Completes the dialogue of the speaker.
boolean IsInDialogState()Beta
Returns true if the speaker is in a dialogue.
YaDialogState GetDialogState()Beta
Gets the dialogue state of the speaker.

Events

AddDialogEvent<YaDialogData>Beta
Fired when new dialogues are added to the speaker.