How do I fade sounds in and out?

0 favourites
  • 2 posts
From the Asset Store
75 explosion sound effects. Essential for many games, Explosions Sounds contains a mix of explosion and impact sounds.
  • This should be pretty simple, but I'm struggling somewhat.

    Say I have audio of a crowd, which I have split up into 5 different audio tracks.

    This is so the game will randomize which parts of the crowd to play, so it doesn't simply sound like it's on loop.

    So I have Crowd01 with a "Crowd" tag play at -100 vol, then fade in to 0 vol over 1 second.

    I then have another event that checks the current position of the track, and when it detects that it's 5 seconds away from the end, it will fade out over 5 seconds.

    This all works fine.

    The problem codes when I want it to then play another Crowd tag, and have that fade in while the other tag fades out.

    When the process loops, and Crowd02 starts playing, and the code tells it to fade in, Construct tells both Crowd01 and Crowd02 to fade in, which overwrites the initial fade out.

    The only way I can think to remedy this is to have each audio track have a unique tag, which increases, so I don't repeat the issue.

    But this seems incredibly stupid. Why don't we have a fade in/out option when initially playing the track?

    Am I missing something simple?

    How would you fade out audio?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes tags is the way so you can differentiate between the different audio, I don't see how that's stupid.

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