Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Disco Elysium dialogues

Hi, how to manage a dialogue script ui like un disco Elysium.
Ex min 3:32 https://youtu.be/BMI325E1rHs
The idea it's to visualice the dialogues selection like a writen script.
Thanks

Comments

  • You can hook into the OnStartSpeech custom event to add speech lines to a Unity UI Text component when lines are spoken:

    using UnityEngine;
    using UnityEngine.UI;
    using AC;
    
    public class MakeDialogueScript : MonoBehaviour
    {
    
        public Text uiText;
    
        private void OnEnable ()
        {
            EventManager.OnStartSpeech += StartSpeech;
        }
    
        private void OnDisable ()
        {
            EventManager.OnStartSpeech -= StartSpeech;
        }
    
        private void StartSpeech (AC.Char character, string lineText, int lineID)
        {
            if (character != null)
            {
                uiText.text += character.GetName ().ToUpper () + " - " + lineText + "\n";
            }
        }
    
    }
    

    This is just an example script, but place it in a C# script named "MakeDialogueScript.cs", and attach it to a UI Text component in your scene, then assign the Text component in it's Inspector. This can replace your Subtitles menu if you wish.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.