Random Dialogue audio plays at weird times

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
bakershah
Posts: 32
Joined: Sun Oct 19, 2014 10:26 am

Random Dialogue audio plays at weird times

Post by bakershah »

Iv'e encountered a unusual bug. after I enter a conversation and skip the dialogue lines to fast forward. when I exit the conversation and start clicking the mouse button for my attack it starts playing an audio dialogue piece from that conversation. I don't know how the two are linking. I have the script in my player controls playing a specific audio source in the component system for the attack but it stops playing when I fast forwarded the conversation and instead plays the dialogue audio.

for the dialogue audio I'm using AudioWait().

also is there a way to specify a bark trigger to only trigger when a certain object enters that trigger?
bakershah
Posts: 32
Joined: Sun Oct 19, 2014 10:26 am

Re: Random Dialogue audio plays at weird times

Post by bakershah »

UPDATE:

its not when I fast forward. Now it just does it generally when I finish a conversation. it will not play my attack sound but instead play a random dialogue sound from the last conversation I had in the scene every time I click the mouse to attack. Usually t's one of the last lines of the conversation I've double checked my input settings and nothing seems to be affecting it from there.
User avatar
Tony Li
Posts: 22106
Joined: Thu Jul 18, 2013 1:27 pm

Re: Random Dialogue audio plays at weird times

Post by Tony Li »

Hi,

By default, the AudioWait() sequencer command uses the first AudioSource component it finds on the subject (in your case the player). The last line of dialogue played through that AudioSource is left as the currently assigned clip. Here are two suggestions:

1. Use a different AudioSource for AudioWait(). For example, give your Player a child GameObject named "Voiceover" with an AudioSource. Then specify it in the AudioWait() command:

Code: Select all

AudioWait(myDialogueLine, Player/Voiceover)
2. Or, when you do your mouse attack, set the AudioSource to the clip that you want to play before playing it.


To specify that a Bark Trigger should trigger only when a certain object enters it, add the object to the trigger's Condition > Accepted GameObjects list.
bakershah
Posts: 32
Joined: Sun Oct 19, 2014 10:26 am

Re: Random Dialogue audio plays at weird times

Post by bakershah »

Bug has been fixed :)

thanks for the quick reply. Cheers!
Post Reply