Page 1 of 1
Random Dialogue audio plays at weird times
Posted: Sat Mar 19, 2016 8:24 pm
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?
Re: Random Dialogue audio plays at weird times
Posted: Sat Mar 19, 2016 8:29 pm
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.
Re: Random Dialogue audio plays at weird times
Posted: Sun Mar 20, 2016 10:13 am
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.
Re: Random Dialogue audio plays at weird times
Posted: Sun Mar 20, 2016 11:01 am
by bakershah
Bug has been fixed
thanks for the quick reply. Cheers!