MusicOff Function - Anyway to override global slow crossfade and quick cut?

Started by MCF, Tue 16/12/2003 03:59:17

Previous topic - Next topic

MCF

I have an MP3 playing in one room.  If the player interacts with object x, they are sent to another room.  I have music in the new room.  Currently, the music crossfades.  Can you specify the song to cut out instantly in this one occurance?


Gilbert


MCF

That is what I have and it doesn't work.  The music is still fading out when the new room loads.  


Is there a wait function I need to put in?

Gilbert

In that case I'm not quite sure about that, probably when crossfade is on, even StopMusic() won't stop the music immediately but fade to silence instead.

I don't see any way to change the crossfade method in game (maybe I overlooked)), in that case a "trick" that may work is when you want the music to stop, temporilarly mute the music channel, then wait for a few game loops and turn it on again (which will cause a delay unfortunately):

StopMusic();
SetMusicVolume(-3);
Wait(40);
SetMusicVolume(0);

Or maybe, instead, try using the StopChannel() function and see if it makes any difference:

StopChannel(0); //channel 0 is music

Scummbuddy

On the first tab, the game options, in that, on the bottom on the left, there is a crossfade music selection,make sure its on no, or fast. try it out.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

MCF

Problem is I want all the music, aside from this one time, to crossfade.  Looks like it may not be possible.

juncmodule

SetGameOption will solve your problems

Change it to not crossfade tracks just between the room change.

EDIT: To be more specific:

SetGameOption(OPT_CROSSFADEMUSIC, 0); // Crossfade off music should stop instantly

SetGameOption(OPT_CROSSFADEMUSIC,3); // Medium crossfade(or whatever your setting is)

After that, just use StopMusic();

Pumaman

Yep, as junc says disable crossfading, stop the music, then re-enable it. For example:

SetGameOption(OPT_CROSSFADEMUSIC, 0);
StopMusic();
SetGameOption(OPT_CROSSFADEMUSIC, 2);

SMF spam blocked by CleanTalk