2. Dialogue Behaviour

The dialogue behavior binds the Dialogue Graph to a game object. This game object will be the Actor for this Graph as default, though you can override it in the Text Node. This component handles almost every runtime functionality that the system has.

The component has four sections, you can enable or disable any or all of these. In this article, I only cover the first three. You can find more information about External Calls in the Advances Sections.

As a default, the system will use the name of the Game Object which has the Dialogue Behaviour as Actor Name. In this section, you can override this, and set a Portrait too.

If you set the Actor Name or the Portrait in the Text Node, that will override these settings!

This section contains all the options you have in case of a conversation type of dialogue. You can set what trigger should start it. You can also find settings that can help you achieve an interactive cinematic.

You can start a conversation with four different ways.

Use Auto Exit: If you enable this option, the conversation will be closed automatically. This will work differently, based on the trigger you are using.

  • Trigger Enter: when the object (possibly the player) exits the trigger.
  • Use / Custom: if the object (possibly the player) is further than the Use/Exit distance, the conversation exists.
  • You can’t use auto exit function in case of OnStart.

Exit Delay (Only visible if Use Auto Exit is enabled): You can delay the exit with this amount of time, measured in seconds. 0 means it closes instantly.

If you are aiming more cinematic style dialogues, this option should help you to put the player into the perfect position. Set the player tag, and assign a transform that represents the player starting position. This transform can be an empty game object.

Dialogue System can support multiple cameras during the conversation. Here you can assign your cameras, from which you can choose in the Text Node.

Default Camera Index: the system will use this camera if the Text Node doesn’t define a custom camera. If this is set to -1, this will be the main camera.

What is the Camera Index? The location of the camera in the list. It starts with 0 (for the camera on the top of the list).

You can set the skin you want to use for this conversation. You can find more information about Dialogue Skins and how to create them later in this documentation.

This section contains all the options you have in case of an ambient type of dialogue. You can set what trigger should start it. This work the same way as in case of a conversation dialogue, except it, will start from the Ambient node in the graph.

When working with ambient dialogues, you want to control two time-value.

  • How long should the text stay visible: you can set this value in the graph with time answer.
  • After becoming invisible, how much time does it take to reappear: you can set this under the Ambient part on the DialogueBehavior.

 

  • Once: after the dialogue is triggered, it’ll play only once. Setting this off will loop the ambient dialogue, based on the Time parameter.
  • Time (once turned off): this is the time in seconds between two Ambient calls.

This section is a great option to communicate with systems outside of the Dialogue. This works pretty much the same as the Unity UI Button OnClick events.

You can add multiple events to a single Dialogue Behavior, but each needs a unique name. In the graph, you can call these events by its name with the Call Event Node.