Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Fade out or turn off the music?

Recommended Posts

I am working on a map where the music has a transition where it goes from a giant battle at the start to an old hell castle in the middle of the city.

So I want to fade out the music into silence for a short time then play another song. I have the basics of ACS scripting down pretty well but I can't seem to figure out how to turn off music. It seems I can only change it.

Anyone know how to turn off music?

Share this post

Link to post

Have you tried something along the lines of this:

script 1 (void)
     for (int i = GetCVar ("SND_MusicVolume"); i > 0; i--)
          SetCVar ("SND_MusicVolume", i);
          Delay (1);
     SetCVar ("SND_MusicVolume", 0);

Share this post

Link to post

That can't be done. User CVARs (basically, user's settings, we're talking about here) can't be changed via SetCVar or its sister functions, only mod-defined CVARs with CVARINFO can. This is deliberate, due to security concerns; you don't want some mod messing about with your settings, do you?

Share this post

Link to post

You CAN however, create a midi that fades out. Perhaps you could use normal repeating music for your battle, then create an intermediary midi to switch to that sounds like the music, then fades out, then switches to a third midi for your second part.

the transition from the first to the second midi might be a little rough. But I'm sure some midi composers could come up with something that will smooth out the bump between your two songs.

good to know you're still mapping for doom. Been watching your videos lately and its pretty enlightening :)

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now