Forum rules - please read before posting.

Scroll speech text vs Narration text Display time factor issue

A "Display time factor" of 0.3 seem to work well for Scroll speech text (dialogue), but then Narration text stays on way too long at this value (e.g. 7seconds for a word). Narration text seen to want Display time factors at the 0.08 levels, but then Scroll text just zips. Is there a better way to control speeds for these two kinds of displays?

I could increase minimum display time, but then even a short text like "Hi" would stay on too long.

Comments

  • What are your AC/Unity versions, and is narration also set to scroll? Do either line types feature audio? These factors all affect the line's total display time.

  • edited October 2

    AC1.84

    Narration not using scroll. No audio for narration. I have audio for a few speech lines, but generally there are no audio, e.g. I set it to audio-play seech audio By Addressables but 90% of those files simply do not exist right now.

  • Sounds like you're best off using a custom script to set the value dynamically based on whether a given speech line is narration or not:

    using UnityEngine;
    using AC;
    
    public class DynamicSpeechTime : MonoBehaviour
    {
    
        public float speechSpeed = 0.3f;
        public float narrationSpeed = 0.08f;
    
        void OnEnable() => EventManager.OnStartSpeech_Alt += OnStartSpeech;
        void OnDisable() => EventManager.OnStartSpeech_Alt -= OnStartSpeech;
    
        void OnStartSpeech(Speech speech)
        {
            if (speech.GetSpeakingCharacter())
            {
                KickStarter.speechManager.screenTimeFactor = speechSpeed;
            }
            else
            {
                KickStarter.speechManager.screenTimeFactor = narrationSpeed;
            }
            speech.ReplaceDisplayText(speech.OriginalText);
        }
    
    }
    
  • Great! I'm not so familiar with scripts, where do I place this script (which object do I attacth it to?)

  • Any object will do - you can attach it to an Empty in each scene, or e.g. your Player prefab to have it carry over between each scene.

  • Works like a charm!

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.