Page 1 of 1
Sequence commands and Timeline
Posted: Wed Aug 25, 2021 6:01 pm
by urrmurrmur
Hi,
I'm experimenting with my pipeline for cutscenes, and have a related question. I'm currently triggering a conversation from timeline, but when I do so, it seems like the sequence commands are not being triggered. I first noticed my audio clips were not being triggered, neither when using AudioWait as the default Sequence command, nor if I put it in a specific dialog entry.
Then I tried adding a Delay(10) to one of my entries, and that didn't work either. The conversation just continued at its normal pace.
It seems like dialogue system is always using the default Delay({{end}}) sequence command when I trigger an entry from a timeline, even though I've overwritten it in the settings. Perhaps I'm using an incorrect bind or something like that?
Anyway, long story short: is it normal that sequence commands are overwritten when starting a conversation from timeline? If so, how does one trigger audio in that case? Is the only way to do it directly from the timeline, or can it be done from the dialogue system as well?
Re: Sequence commands and Timeline
Posted: Wed Aug 25, 2021 7:23 pm
by Tony Li
Hi,
No, that's not normal. Are there any errors or warnings in the Console window?
Note that if an Animator or Audio Source is assigned to a Timeline track, Timeline will take control of the Animator or Audio Source, and nothing else (including sequencer commands and other scripts) will be able to change it for the duration of the timeline. But that's the only restriction I can think of.
Can you send a
reproduction project to tony (at) pixelcrushers.com?
Re: Sequence commands and Timeline
Posted: Thu Aug 26, 2021 5:52 am
by urrmurrmur
No errors or warnings. I'll see what I can do about the reproduction project, but our project is fairly big, so I think I'd better try to reduce the size somewhat before doing so.
First though, let me see if I'm not doing something stupid, which is very possible. This is what my timeline looks like:
- timeline.png (54.82 KiB) Viewed 2430 times
I'm not sure which object I'm supposed to bind to the start conversation track (Second from the bottom). I've tried with one of the conversants, and with the Dialogue Manager object itself. The continue track (bottom one) is currently muted, since the conversation continues automatically anyway. Still experimenting with the best approach there.
The main thing I'm wondering though, is which audio source does the dialogue system use for playing the sound? Maybe the problem is as simple as it not finding one, and thus deciding not to play the sound?
Re: Sequence commands and Timeline
Posted: Thu Aug 26, 2021 8:48 am
by Tony Li
Hi,
That timeline looks okay, except assign the conversation actor to the Start Conversation track.
The AudioWait() command plays audio on its 'subject'. If you've omitted the subject parameter, it will use the dialogue entry node's speaker. For example, if Robin is the current node's speaker, it will look for an Audio Source on Robin's GameObject. If it doesn't find one, it will create a default Audio Source.
Another extremely remote possibility is that you've created a a Dialogue System variable named "Mute" and set it to true. If this variable exists and is true, all Audio() and AudioWait() commands will be muted.
What's more likely is that the sequences aren't playing for some reason. Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. As the timeline and conversation plays, the Console window will log all Dialogue System activity, including which sequencer commands it's playing. I'm guessing that you won't see the AudioWait() commands being logged.
Do you have any scripts with
OnConversationLine methods that modify the subtitle's sequence property?
Re: Sequence commands and Timeline
Posted: Thu Aug 26, 2021 9:51 am
by urrmurrmur
So, just to reply to your questions first:
- Haven't made a mute variable
- No scripts with OnConversationLine
- I actually DO see the AudioWait being called (See below), I just can't hear the sound
- debug.png (151.66 KiB) Viewed 2427 times
I suspect the problem is related to the AudioSource. Weird though, since I hear the sound files just fine if I trigger the conversation from gameplay, through a DialogueTrigger component.
My speaker, the one who has the DialogueActor component, doesn't have an AudioSource. We use a hierarchical prefab where most components are on an empty parent object, but some are on children. One of those children is an object with SALSA components, and that one includes the AudioSource. Could that be related? I've tried replacing AudioWait by SALSA calls in the Sequence, btw, the result remains the same (works in normal gameplay, not through timeline).
Btw, it's not an enormous problem, since atm I'm gravitating towards playing the audio files from a timeline track for the cinematic I'm working on. Makes it easier to sync them to the animations. But I am curious what the issue is, and perhaps later on I would like to use autoplaying sound from a timeline.
Re: Sequence commands and Timeline
Posted: Thu Aug 26, 2021 9:58 am
by Tony Li
Try playing the scene and timeline again. As soon as it "should" be playing audio, pause the game. Is the Audio Source's Volume correct? If it's 3D, is it close enough to the Audio Listener (e.g., camera) to be heard? If you've assigned an Audio Mixer channel to the Audio Source, is that mixer channel audible?
Re: Sequence commands and Timeline
Posted: Thu Aug 26, 2021 1:22 pm
by urrmurrmur
I printed out the name of the audio source from the sequencer command script, to make sure I had the right one. It's configured like this:
- audioSource.png (47.5 KiB) Viewed 2425 times
So, 2D spatial blend, no mixer group and volume set to 1. This screenshot was taken right after pausing when the terminal printed the AudioWait command, as you said.
Re: Sequence commands and Timeline
Posted: Thu Aug 26, 2021 3:09 pm
by Tony Li
Can you put together a reproduction project?
Or, if you prefer, I can send you a test scene that demonstrates a conversation's AudioWait() commands working inside a timeline. Maybe you could compare it to your own setup to see if there are any differences.
You've probably already this, but double-check the 3 icons in the upper right of the Console window to verify that it's not hiding warnings or errors.
Re: Sequence commands and Timeline
Posted: Thu Aug 26, 2021 4:12 pm
by urrmurrmur
Oh god. I've got it, and it was tremendously stupid.
You've probably already this, but double-check the 3 icons in the upper right of the Console window to verify that it's not hiding warnings or errors.
This was the key, I was in fact hiding warnings without realizing it. When I turned them on, I saw that my audio files weren't being found. Weird right, since they did play when I triggered the conversation from gameplay? But then I noticed the conversation id was different...
Turns out I had accidentally made a copy of the conversation and was triggering the wrong one from the timeline. No wonder none of my sequencer commands seemed to be triggering. Sorry for wasting your time, Tony, I really should have realized my mistake earlier
Re: Sequence commands and Timeline
Posted: Thu Aug 26, 2021 4:44 pm
by Tony Li
No worries; I'm glad you were able to get to the bottom of it! This was turning into a bit of a mystery, so I'm glad there was a clear answer.