Forum rules - please read before posting.

Proximity to Scroll Sound

Hi,

When we tested our game we have seen that there are issues that we don't want with our scroll sounds. Appearently scroll sounds belong to SFX Master Audio Channel, but we want them to be in Speech so is there any way that we can move Scroll sounds do Speech channel.

And the most important thing that we want to know is that how do we add Proximity (3D Space) to our scroll audio and speeche audio ?

Comments

  • A potential "Map scroll audio to character" option should solve all of those issues. I'll give it some consideration.

    In the meantime, you can do this by overriding the Dialog script's PlayScrollAudio function.

    Create a new C# script named ScrollAudioFromSpeech, and replace the GameEngine's Dialog component with it.

    using UnityEngine;
    using AC;
    
    public class ScrollAudioFromSpeech : Dialog
    {
    
        public override void PlayScrollAudio (AC.Char _speaker)
        {   
            AudioClip textScrollClip = KickStarter.speechManager.textScrollCLip;
    
            if (_speaker == null)
            {
                textScrollClip = KickStarter.speechManager.narrationTextScrollCLip;
            }
            else if (_speaker.textScrollClip)
            {
                textScrollClip = _speaker.textScrollClip;
            }
    
            if (textScrollClip)
            {
                AudioSource audioSource = (_speaker) ? _speaker.speechAudioSource : KickStarter.sceneSettings.defaultSound.audioSource;
                if (audioSource)
                {
                    if (KickStarter.speechManager.playScrollAudioEveryCharacter || !defaultAudioSource.isPlaying)
                    {
                        defaultAudioSource.PlayOneShot (textScrollClip);
                    }
                }
                else
                {
                    ACDebug.LogWarning ("Cannot play text scroll audio clip as no 'Default sound' has been defined in the Scene Manager");
                }
            }
        }
    
    }
    

    This override will rely on the character's "speech audio source", so its 3D settings and sound type will be used instead of the scene's default.

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.