Recommended way to have Dialogue System handle music?
Recommended way to have Dialogue System handle music?
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?
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:
You can also write your own custom sequencer commands (see here). The process is easy if you're moderately comfortable with scripting.
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)
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?
Thank you for the tips and suggestions Tony! I will give one or more of them a shot within the next few days.