Forum rules - please read before posting.

Question about how to fade in/out music between scenes

Hey,
Music is a crucial part of my game, and using fades to transition music between scenes is crucial. However, I’m having trouble figuring out how to make AC fade the music properly between scenes. I tried using the Sound: Play fade-out action, but it doesn’t seem to work. Am I missing something?

Comments

  • The Sound: Play Action works by affecting specific Sound objects in the scene - so the Sound in one scene won't be present after switching to another.

    For music, it's best to rely on the dedicated Sound: Play music Action, as this handles persistence between scenes automatically. You can still use this Action to fade out music / cross fade to others, but it's behaviour will not be affected by scene-switches, and its playback will also be stored in save-game files automatically.

  • Thank you, Chris. I forgot to mention that this music is for the title menu, and I can't use Sound: Play music because it plays automatically between scenes, which is not what I want. I'm currently using Sound: Play one shot, but I’m facing the same issue—there’s no fade in or fade out.

  • You can still make use of the Music Action without it playing across scenes - just use another such Action to stop the music before exiting.

    Sound: Play one-shot has no fading controls, as a one-shot audio involves playing an AudioClip once as-is. If you're having an issue with Sound: Play, you're welcome to share screenshots, but I still recommend use of the dedicated Sound: Play music Action.

  • Hey Chris,

    When I use Sound: Play, it still doesn't fade out, even when I use Sound: Play—Fade out.

    OnStart: https://prnt.sc/6c4WQnIA3U7S
    OnLoad: https://prnt.sc/1w6el_SOXvQL
    Tile menu: https://prnt.sc/-fIUk7TuUnv4

  • The Scene Manager's "OnLoad" cutscene will be called when that scene is opened as the result of loading a save-game file - not when the user opts to load a file while that scene is open.

    Are you looking to run this when the user clicks a save-file within the Load menu? If so, you'd need to modify that menu's SaveList element to have it run an ActionList that handles the fade-out, and then manually loads the file with the Save: Save or load Action.

  • No, I want to fade the music when the player clicks "New Game" and starts the Intro scene.

  • The explanation Chris gave you still applies for the most part, just using a different type of button, i.e. the "fade out" action that is currently in your OnLoad cutscene needs to be moved to the actionlist that runs when you click "New Game". Don't forget to give it time to run before running the action that loads the intro scene, either by selecting "wait until finish" or following it with another action that takes time to run (like a screen fade).

  • Thank you for the explanation, Chris and Rairum. I had included the action within my New Game action list, but it didn’t work initially. However, after ticking "Wait until finish," it now works perfectly. Thanks, again

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.