Forum rules - please read before posting.

Question Regarding Speech

Hello,

I have a question. I've set up speech with audio and everything. however, I get the following error when I have a dialogue speech with no audio set for it

Audio file 'Resources/Speech/Narrator922' not found in Resources folder.

I don't want every dialogue speech to require audio...

Comments

  • It's safe to ignore such warnings for lines that have no intended audio.

  • Hey Chris,
    I have a question regarding speech. If I have Display subtitles forever until user skips it? checked, but what about if I want to make a specific character subtitles not to be skipped?

  • You can use custom scripting to alter Manager fields at runtime - see this tutorial.

    To run such code when a character speaks, hook into the OnStartSpeech event in a script attached to that character:

    using UnityEngine;
    using AC;
    
    public class DynamicSkip : MonoBehaviour
    {
    
        void OnEnable ()
        {
            EventManager.OnStartSpeech += OnStartSpeech;
            EventManager.OnStopSpeech += OnStopSpeech;
        }
    
        void OnDisable ()
        {
            EventManager.OnStartSpeech -= OnStartSpeech;
            EventManager.OnStopSpeech -= OnStopSpeech;
        }
    
        void OnStartSpeech (AC.Char speakingCharacter, string speechText, int lineID)
        {
            if (speakingCharacter && speakingCharacter.gameObject == gameObject)
            {
                KickStarter.speechManager.displayForever = false;
            }
        }
    
        void OnStopSpeech (AC.Char speakingCharacter)
        {
            if (speakingCharacter && speakingCharacter.gameObject == gameObject)
            {
                KickStarter.speechManager.displayForever = true;
            }
        }
    
    }
    
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.