Managing music across scenes

It's quite common for adventure games to make use of good music to immerse the player. This music will often need to play across scenes, so that there's no disruptive break in the audio.

A new music engine in AC v1.51 makes the management of such behaviour much easier. We can play music tracks, queue them up, and have everything saved automatically in save game files. Note that you can still use the previous Sound system and Actions if you want control over which AudioSources music is played from.

Let's have some music play when our scene begins. If you haven't already, create a new "On Start" Custsene by clicking Create beside On Start in the Scene Manager:

Inside this Cutscene, create a new Sound: Play music Action. If you're using this Action for the first time, you'll see an information box at the top:

We need to assign some AudioClips as music tracks before we can play them using this Action. Click Music Storage window to bring up a window where we can assign some. Click Add new music clip a couple of times, and assign some AudioClips inside the two Clip boxes that appear:

If you need to, you can use the sliders to set the Relative volume that each clip is played at. The overall volume of these clips will be determined by your game's Music volume, which is available to change in your game's Options menu.

Close the Music Storage window and go back to the Sound: Play music Action. You'll see that the tracks we've just assigned are now available to select in the Music track popup box:

We can now use this Action to play some music. This music will play across scenes automatically. If you want to stop the music at any time, just use this Action again and set Music action to Stop.

You can also queue music so that one track only begins playing once the current track has finished. Just check Queue? on any subsequent track:

Adventure Creator and this website are copyright Chris Burton, ICEBOX Studios

Go to top
Do NOT follow this link or you will be banned from the site!