Waiting in the game engine/Fading sounds

I have a button on my main menu in the blender game engine, when you click it the game is suppose to shut off and it does. But I’d like an animation to fade out the screen before it does. How would I make the logic bricks wait for 50 frames so the fade out can take place before the game shuts off?

Also I’d like the background music to fade with the fade out animation, is there really no way of doing this without scripts?

a video texture seems like the better alternative: http://www.tutorialsforblender3d.com/Game_Engine/VideoTexture/VideoTexture_Movie_1.html

Not sure why I need a movie, I found the delay sensor and figured out how it works. Still not sure how to make the background music fade out with the screen though.

Is the song on a loop? If so, I’m not sure, but the idea was that a video texture (as an exit cutscene that fades) and a synced soundtrack that fades out (something looped wouldn’t really work).
I’d like to know how you managed to fade with a delay sensor :smiley: .

Here you are.


You have to use a script. Logic bricks system doesn’t have all the things needed. You can use two versions of the same sound. One looping version , and one linear fading out. And you just switch between the two on exit.

You can use logic bricks. Just instead have it add an overlay scene that has a plane with the fading out animation. Also have your sound pre-faded (bring it into a sound editing program and fade out)

You can do this thing right here just set the Doppler factor to 0 to have only fade ins and outs without pitch shifting. Just put your sound on a moving object and it will fade out as it moves away from the camera. Sorry I forgot about the 3d sound. Press P to play and Right click to switch directions. Set objects invisible in game.

Attachments

SoundFadeBasedOnMotion.blend (173 KB)

The music in that blend isn’t playing for me, even changed the file into one of my own still won’t play.

Same here, don’t know if I have blender setup right for audio,