Dear all, I'm trying to get my music tracks to fade in and out, depending on the situation. I could use some help conceptualizing it.
The game: sneak around and don't get seen. Hide in shadows and evade guards/cameras.
The wanted effect: imagine a 80's funk baseline track playing in the background. This loops for as long as the player remains unseen. As soon as the player is within a guard's/camera's LOS the music fades out and a timer "detection" starts running for 3 seconds. When "detection" runs >/= 0, another funk track (james brownish trumpets) already running in the background fades in (increase volume from 0 to the desired volume, 100 by default), changing the background music to a more upbeat loop. This continues until the player is hiden again. The trumpets fade out to mute and the base fades back up.
Am I on the right track?
As always, thank's for reading