User Tools

Site Tools


code:dialog

Dialog

Dialogs Files

A dialog is defined in a xml files. Dialogs files are in Assets/Data/Dialog. The format of this file is the following :

  <Dialog>
      <Title>King Intro Dialog</Title>
      <Text>
          <Part ActorName="Knight">My King!!! My King you have to run. The castle will fall.</Part>
      </Text>
  </Dialog>

The ActorName must be the name of an actor object.

Actors

An actor is an asset to describe a character in a dialog. It contains a name and a picture of the actor. Actrs can be created using the menu Persistent/Create/Dialog Actor

Dialogs In Sequences

There are two ways to play a dialog in a sequence:

  • The first way is to play the entire dialog at once in the sequence. To do so you need to add the “Dialog/Play Complete Dialog” tweener in a Global Track. This tweener will stop the scene, play the dialogs entierly, and resume the scene.
  • The second way is to play the replies one by one. To do so you need to create a game object with the Sequence_Dialog Player script. Then you need to create a track on this game object in the sequence. Every time you want to show a reply of the dialog, add the tween “Game Object/Send Message”. Send the message “ShowDialog”. Every time you send this message, the dialog will play the next reply always.

Dialogs in Levels

To play a dialog, you need to use a Trigger_Press Button and an Interaction Dialog. The trigger press button contains the conditions to launch the interaction dialog. The interaction dialog knows what dialog to play. It needs to be registered to the Trigger_Press Button “Interactions” list. This list contains all the interactions to execute when the trigger is activated.

code/dialog.txt · Last modified: 2015/05/03 17:33 by 82.247.193.95