Adding sound to dialogues
Adding sound to dialogues
Hi,
I would like to add voices to my characters during dialogues, but without a elaborate voice-over system.
It's really as simple as playing a sound on mouseclick after starting a dialogue, and stop playing that sound on the next mouseclick, so that sounds of characters don't overlap.
Would I use Audio() in the Sequence, or what's the best/easiest way of doing that, you think ?
http://www.pixelcrushers.com/dialogue_s ... mmandAudio
Thanks
I would like to add voices to my characters during dialogues, but without a elaborate voice-over system.
It's really as simple as playing a sound on mouseclick after starting a dialogue, and stop playing that sound on the next mouseclick, so that sounds of characters don't overlap.
Would I use Audio() in the Sequence, or what's the best/easiest way of doing that, you think ?
http://www.pixelcrushers.com/dialogue_s ... mmandAudio
Thanks
Re: Adding sound to dialogues
Hi,
If each dialogue entry node has a different audio file (for example, a recording of an actor speaking the dialogue text), put the audio files in a folder named Resources. The files can be inside subfolders if you want.
Then inspect each dialogue entry node. Drag the corresponding audio file into the Sequence field.
If you have many dialogue entry nodes and you don't want to drag an audio file onto each one, see Cutscene Tutorial 4 (entrytags).
If you want to play the same audio file (for example, cartoon "mumble speak") for every dialogue entry node, configure the subtitle line typewriter effect's OnBegin() event to play the audio file and OnEnd() event to stop the audio file.
If each dialogue entry node has a different audio file (for example, a recording of an actor speaking the dialogue text), put the audio files in a folder named Resources. The files can be inside subfolders if you want.
Then inspect each dialogue entry node. Drag the corresponding audio file into the Sequence field.
If you have many dialogue entry nodes and you don't want to drag an audio file onto each one, see Cutscene Tutorial 4 (entrytags).
If you want to play the same audio file (for example, cartoon "mumble speak") for every dialogue entry node, configure the subtitle line typewriter effect's OnBegin() event to play the audio file and OnEnd() event to stop the audio file.
Re: Adding sound to dialogues
That's exactly what I was looking for! perfect. and the sounds don't overlap. Thank you
Re: Adding sound to dialogues
Glad to help!
Re: Adding sound to dialogues
Hello,
I am getting back to you concerning the sounds for the dialogues, where you helped me out last time. I only tested the sounds on NPC last time I wrote to you, and not on the player responses last time.
Only now I realize, after recording all sounds, that the NPC plays the sound at the beginning of text displaying, and the player plays it at the end, after clicking the mouse click. Which is an issue, that means the sound of the player plays at the next NPC sequence. I hope you see what I mean.
How can I prevent that?
Thanks
I am getting back to you concerning the sounds for the dialogues, where you helped me out last time. I only tested the sounds on NPC last time I wrote to you, and not on the player responses last time.
Only now I realize, after recording all sounds, that the NPC plays the sound at the beginning of text displaying, and the player plays it at the end, after clicking the mouse click. Which is an issue, that means the sound of the player plays at the next NPC sequence. I hope you see what I mean.
How can I prevent that?
Thanks
Re: Adding sound to dialogues
Hi,
1. Inspect the Dialogue Manager.
2. Tick Subtitle Settings > Show PC Subtitles During Line.
3. Untick Input Settings > Always Force Response Menu.
Try it out. Optionally also untick Subtitle Settings > Skip PC Subtitle After Response Menu.
1. Inspect the Dialogue Manager.
2. Tick Subtitle Settings > Show PC Subtitles During Line.
3. Untick Input Settings > Always Force Response Menu.
Try it out. Optionally also untick Subtitle Settings > Skip PC Subtitle After Response Menu.
Re: Adding sound to dialogues
Hi,
Thanks for your message.
This solves the sound issue, however, after changing these settings, a 'continue' button shows up on the right, which did not happen before. I don't need a 'continue' button, since the dialogue progression happens with mouse click already. Also, since ticking/unticking these boxes, now before going to NPC dialogue line directly, the player's dialogue line, reappears quickly, blending in, so shows up on the screen twice instead of once. Not sure why those two things are happening.
Also, another issue, the player's sound is overlapping, while the sound attached to the NPC 'Sequence' is not. Not sure why
Any help would be appreciated
Thanks for your message.
This solves the sound issue, however, after changing these settings, a 'continue' button shows up on the right, which did not happen before. I don't need a 'continue' button, since the dialogue progression happens with mouse click already. Also, since ticking/unticking these boxes, now before going to NPC dialogue line directly, the player's dialogue line, reappears quickly, blending in, so shows up on the screen twice instead of once. Not sure why those two things are happening.
Also, another issue, the player's sound is overlapping, while the sound attached to the NPC 'Sequence' is not. Not sure why
Any help would be appreciated
Re: Adding sound to dialogues
You can delete the continue button GameObject on the player's subtitle panel.
I can't answer why the player's subtitle panel briefly flashes without a little more info about your dialogue UI. Are you using one of the dialogue UI prefabs that ships with the Dialogue System? Or a custom one? Try deactivating the player's subtitle panel at design time. The dialogue UI component should activate it as needed. Or it could be an animation issue. The simplest solution is to remove the animator from the player's subtitle panel; but this will remove the animation and the panel will simply be activated when needed and deactivated when no longer needed.
What is the Sequence for your player's dialogue entry node? It should be AudioWait(audioClip), where audioClip is one of the player's lines.
I can't answer why the player's subtitle panel briefly flashes without a little more info about your dialogue UI. Are you using one of the dialogue UI prefabs that ships with the Dialogue System? Or a custom one? Try deactivating the player's subtitle panel at design time. The dialogue UI component should activate it as needed. Or it could be an animation issue. The simplest solution is to remove the animator from the player's subtitle panel; but this will remove the animation and the panel will simply be activated when needed and deactivated when no longer needed.
What is the Sequence for your player's dialogue entry node? It should be AudioWait(audioClip), where audioClip is one of the player's lines.
Re: Adding sound to dialogues
Hello,
Thanks so much for your response.
Unfortunately, delete/deactivating the 'Continue Button' gameobject, causes the dialogue system gets stuck after the player's response shows up. The dialogue does not proceed, even after clicking. So I am not quite sure to stop 'Continue' from showing up on the screen.
Yes, I am using UI dialogue prefabs that comes with the dialogue system
I am using 'Letterbox template standard dialogue UI'
The flashing text problem is resolved though. It plays smoothly now. So that's good.
As for the Sequence in the dialogue system, I click and dragged the sound files into the 'Sequence', for both player and NPC. Works for NPC, do I need to formulate the code differently for the player? Changing 'Audio' to 'AudioWait' does not seem to be doing anything differently for the player.
So basically the issues I am facing now: the sounds of the player are overlapping with the NPC's until the next player sound gets activated. So basically player's sounds only overlap with NPC and NPCs only overlap with players. (Player sounds don't overlap with each other and NPC sounds don't overlap with each other)
And the 'Continue' button issue is still present.
I am sending you a few screenshots (Dialogue Manager Settings, Dialogue System Sequence, Response Manu Panel Inspector), I figured it's easier:
https://ibb.co/16tKNr6
https://ibb.co/g45ZV24
https://ibb.co/nRFGxb1
https://ibb.co/Rch2DMk
https://ibb.co/wdKqCTj
https://ibb.co/x7KzXXF
https://ibb.co/tzXXcKh
https://ibb.co/9ZQTQj2
https://ibb.co/WF5vsj8
Thanks so much for your response.
Unfortunately, delete/deactivating the 'Continue Button' gameobject, causes the dialogue system gets stuck after the player's response shows up. The dialogue does not proceed, even after clicking. So I am not quite sure to stop 'Continue' from showing up on the screen.
Yes, I am using UI dialogue prefabs that comes with the dialogue system
I am using 'Letterbox template standard dialogue UI'
The flashing text problem is resolved though. It plays smoothly now. So that's good.
As for the Sequence in the dialogue system, I click and dragged the sound files into the 'Sequence', for both player and NPC. Works for NPC, do I need to formulate the code differently for the player? Changing 'Audio' to 'AudioWait' does not seem to be doing anything differently for the player.
So basically the issues I am facing now: the sounds of the player are overlapping with the NPC's until the next player sound gets activated. So basically player's sounds only overlap with NPC and NPCs only overlap with players. (Player sounds don't overlap with each other and NPC sounds don't overlap with each other)
And the 'Continue' button issue is still present.
I am sending you a few screenshots (Dialogue Manager Settings, Dialogue System Sequence, Response Manu Panel Inspector), I figured it's easier:
https://ibb.co/16tKNr6
https://ibb.co/g45ZV24
https://ibb.co/nRFGxb1
https://ibb.co/Rch2DMk
https://ibb.co/wdKqCTj
https://ibb.co/x7KzXXF
https://ibb.co/tzXXcKh
https://ibb.co/9ZQTQj2
https://ibb.co/WF5vsj8
Re: Adding sound to dialogues
Hello,
Please inspect every dialogue entry node in your conversation. Change "Audio" to "AudioWait". For example, change this:
Audio(Voice Overs/Bacterias 1/1)
to this:
AudioWait(Voice Overs/Bacterias 1/1)
When you drag an audio file into the Sequence field, it adds a command to the Sequence field. Somehow the default command was changed from AudioWait to Audio. Change it back to AudioWait so it will add the correct command when you drag new audio files. To change it back to AudioWait, use this menu item:
Please inspect every dialogue entry node in your conversation. Change "Audio" to "AudioWait". For example, change this:
Audio(Voice Overs/Bacterias 1/1)
to this:
AudioWait(Voice Overs/Bacterias 1/1)
When you drag an audio file into the Sequence field, it adds a command to the Sequence field. Somehow the default command was changed from AudioWait to Audio. Change it back to AudioWait so it will add the correct command when you drag new audio files. To change it back to AudioWait, use this menu item: