Skip to content

YaDialogAPI

YaDialogAPI is a class for managing dialogues of speakers.

Functions

YaDialogStateListener YaDialogAPI.StateListener(YaEntity entity)
A listener to events about dialogue state changes for the specified entity
  • entity The entity that you want to listen to
YaCharacterDialog YaDialogAPI.CharacterDialog(YaEntity character)
An API handle for managing a character's dialogues
  • character The character
YaCharacterDialogBySpeaker YaDialogAPI.CharacterDialogBySpeaker(YaEntity character, YaEntity speaker)
Gets the dialogue of the speaker associated with the character.
YaDialogConfig YaDialogAPI.GetDialogConfig(number dialogID)
Gets the dialogue configuration using dialogID.
void YaDialogAPI.OnEnterDialogState(function callback<YaEntity, YaDialogState>)
Fired when any conversation occurs.
  • callback A callback with characters in the conversation and dialogue information
void YaDialogAPI.OnExitDialogState(function callback<YaEntity, YaDialogState>)
Fired when any conversation is interrupted.
  • callback A callback with characters in the conversation and dialogue information
void YaDialogAPI.OnDialogStateEnds(function callback<YaEntity, YaDialogState>)
Fired when any conversation is finished.
  • callback A callback with characters in the conversation and dialogue information