Fading Music

  • I haven't found a thread much about this but, is there a clean way so that i can make music fadeout as I leave the layout? :3

  • I have not heard of any way of going about doing this so your best bet is to create a variable that increases over a few ticks and set your gain to the negative of that variable and when it is greater than 20, move to the layout

  • Or without a variable, and using dt for a smoother effect : events

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, this is quite simple. Whenever you would trigger to go to the next layout, delay it a bit. Have a variable as something like "fadeoutmusic" and then set it to 1 when you would end the layout. This is also a good time to fade in an all-black tiled background over top of the layout to have it fade to black, but that's for another day.

    -If fadeoutmusic = 1, set audio volume to Audio.Volume("yourmusictag")-200*dt

    -Compare 2 variables

    ------if Audio.Volume("yourmusictag") < or = 0, Go to layout, trigger once

  • I'm having a bit of confusion when I try

    set audio volume to Audio.Volume("yourmusictag")-200*dt

    It says it's looking for a string not a number?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)