Forum rules - please read before posting.

Subtitle time on screen

Hey Chris, is there a way to:

A - Increase the time until the next subtitle line is played (with audio).
B - Have an option feature where the player can turn on or off to keep that line on screen until they click a mouse button?

Comments

  • Increase the time until the next subtitle line is played (with audio).

    Set a non-zero Initial post-line delay (s) value in the Speech Manager.

    Have an option feature where the player can turn on or off to keep that line on screen until they click a mouse button?

    Essentially giving them control over the Speech Manager's Display subtitles forever until user skips it? field? That can be done through scripting. A tutorial on creating custom options can be found here, and the code to control this field is:

    AC.KickStarter.speechManager.displayForever
    
  • Thanks, two questions:

    1. Is it possible to have subtitles for different languages set to a pre set time shown on screen?

    2. I have set my time to 2, but it doesn't seem to stay on longer than the speech audio. See image below for my settings:

    https://drive.google.com/file/d/1EEgRQ3smk1AuB9BNXPviCvUsokMPXnRf/view?usp=share_link

  • Is it possible to have subtitles for different languages set to a pre set time shown on screen?

    All Manager field values can be modified at runtime - just right-click the field's label to get an API reference to it.

    To change the wait-time offset when the language is changed, hook into the OnChangeLanguage custom event:

    using UnityEngine;
    using AC;
    
    public class DynamicWaitTime : MonoBehaviour
    {
    
        private void OnEnable () { EventManager.OnChangeLanguage += OnChangeLanguage; }
        private void OnDisable () { EventManager.OnChangeLanguage -= OnChangeLanguage; }
    
        private void OnChangeLanguage (int language)
        {
            float newWaitTimeOffset = 0f;
            switch (language)
            {
                case 0:
                default:
                    newWaitTimeOffset = 2f;
                    break;
    
                case 1:
                    newWaitTimeOffset = 3f;
                    break;
    
                // etc
            }
    
            KickStarter.speechManager.waitTimeOffset = newWaitTimeOffset;
        }
    
    }
    

    I have set my time to 2, but it doesn't seem to stay on longer than the speech audio. See image below for my settings:

    Your link is private, but the field value shouldn't be impacted by the presence of audio or not - provided you are using the Dialogue: Play speech Action and not Timeline.

  • edited December 2022
    Video now free to watch now and I’m using dialogue: play speech
  • It may be an issue with the use of Addressables.

    Is the offset value respected if you switch your Reference speech files field to By Direct Reference, and play a speech that's had its audio assigned within its entry in the Speech Manager?

  • I am loathe to try it as I think I need to move the audio into the resources folder and worried I will break my addressables connection

  • I can't recreate an issue on my end, either way.

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.