Page 1 of 1
Recommended way to have Dialogue System handle music?
Posted: Wed Jan 31, 2018 3:13 am
by ilike2d
Hi, I have a somewhat vague question but was hoping for some pointers/general advice... I want to have particular conversations in my game change the music that is playing at the time, and then sometimes change the music in the middle of the conversation. I was wondering if there is a preferred way to do something like this with Dialogue System? Thank you!
Re: Recommended way to have Dialogue System handle music?
Posted: Wed Jan 31, 2018 9:16 am
by Tony Li
Hi,
It depends on how you're handling your music in general. At the most basic, you could use the
Audio() sequencer command in a dialogue entry node's
Sequence field. Specify the name of the GameObject that has your music Audio Source. For example:
- Dialogue Text: "Whoooo disturbs my eternal sleeeep?"
- Sequence: {{default}}; Audio(Mysterious Song, MusicManager)
If you're using something like Master Audio (see
Master Audio Support), you can use Master Audio-specific sequencer commands such as MAChangePlaylist(). Third party audio assets like Master Audio provide advanced audio features such as ducking and transitions.
You can also write your own custom sequencer commands (see
here). The process is easy if you're moderately comfortable with scripting.
Re: Recommended way to have Dialogue System handle music?
Posted: Wed Jan 31, 2018 9:36 pm
by ilike2d
Thank you for the tips and suggestions Tony! I will give one or more of them a shot within the next few days.