YaCharacterDialog
YaCharacterDialog is an object representing dialogues on speakers.Functions
boolean IsValid()
Returns true if the struct is valid.
number AddDialogWithQuestID(number dialogID, number questID, number speakerID, [number customTriggerID])
Adds a dialogue with a quest to a speaker.
dialogIDThe unique identifier of the dialoguequestIDThe unique identifier of the questspeakerIDThe EntityID of the speakercustomTriggerIDUsed to group UI dialogues
number AddDialog(number dialogID, number speakerID, [number customTriggerID])
Adds a dialogue to a speaker.
dialogIDThe unique identifier of the dialoguespeakerIDThe EntityID of the speakercustomTriggerIDUsed to group UI dialogues
boolean ContainsDialog(number dialogSN)
Returns true if the speaker contains an interactable dialogue.
dialogSNThe serial number of the dialogue
boolean RemoveDialog(number dialogSN)
Removes an interactable dialogue for the speaker.
dialogSNThe serial number of the dialogue
number GetDialogsCount(number speakerID)
Gets the number of interactable dialogues on the speaker.
speakerIDThe EntityID of the speaker
Array<YaDialogData> GetDialogs(number speakerID)
Gets the dialogue list of interactable dialogues on the speaker.
speakerIDThe EntityID of the speaker
boolean TryAddCompletedDialog(number dialogID, number speakerID, number dialogSN)
Records the finished dialogue for a speaker.
dialogIDThe unique identifier of the dialoguespeakerIDThe EntityID of the speakerdialogSNThe serial number of the dialogue
boolean ContainsCompletedDialog(number dialogSN)
Returns true if the dialogue is finished for the speaker.
dialogSNThe serial number of the dialogue
boolean ContainsCompletedDialogByAny(number dialogID)
Returns true if the speaker has completed the dialogue.
dialogIDThe unique identifier of the dialogue
boolean RemoveCompletedDialog(number dialogSN)
Removes the completed dialogues recorded on the speaker.
dialogSNThe serial number of the dialogue
void EnterDialogState(number dialogID, number speakerID, number dialogSN, [number customTriggerID])
Enters a dialogue with a speaker.
dialogIDThe unique identifier of the dialoguespeakerIDThe EntityID of the speakerdialogSNThe serial number of the dialoguecustomTriggerIDUsed to group UI dialogues
void SelectOption(number dialogSN, number sentenceID, number optionID)
Selects an option in the current dialogue.
dialogSNThe serial number of the dialoguesentenceIDThe unique identifier of the sentenceoptionIDThe unique identifier of the option
Array<YaDialogSelectOption> GetSelectOptions()
Gets all options of the speaker. Call it in the dialogue end event.
void ExitDialogState()
Interrupts the dialogue of the speaker.
void DialogStateEnds()
Completes the dialogue of the speaker.
boolean IsInDialogState()
Returns true if the speaker is in a dialogue.
YaDialogState GetDialogState()
Gets the dialogue state of the speaker.
Events
AddDialogEvent<YaDialogData>
dialogDataIncluding information about dialogue