Aller au contenu

Photo

StopMusic() does not work....


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
JackFuzz

JackFuzz
  • Members
  • 408 messages
{

//stop the kissing music before playing romance cutscene
//kissing_music is name of the sound under sounds in toolset and name of sound being played
//during the kissing cutscene....
StopMusic("kissing_music");

CS_LoadCutscene(..... etc)

}

Yet the kissing music continues to play.... *sigh*

{
StopMusic("music/kissing/kissing_music");
}

This doesn't work either.....

StopMusic says it can "stop all music"... Anyone know how to get it to do that?

Modifié par JackFuzz, 13 février 2010 - 03:22 .


#2
JackFuzz

JackFuzz
  • Members
  • 408 messages
Bump!

This is the last problem I've encountered for my mod.

It's so cheesy when two songs play over each other.

#3
JackFuzz

JackFuzz
  • Members
  • 408 messages
*bangs head against desk*

*bangs head against desk*

*bangs head against desk*

*bangs head against desk*

*bangs head against desk*

#4
anakin5

anakin5
  • Members
  • 258 messages
It may stop a currently running music. Did you try calling StopMusic after CS_LoadCutscene ?

If yes, did you try calling StopMusic in an other event, just after the one you currently use ?

About stopping all musics, did you try StopMusic(""); ?

Modifié par anakin5, 13 février 2010 - 02:51 .


#5
JackFuzz

JackFuzz
  • Members
  • 408 messages

anakin5 wrote...

It may stop a currently running music. Did you try calling StopMusic after CS_LoadCutscene ?

If yes, did you try calling StopMusic in an other event, just after the one you currently use ?

About stopping all musics, did you try StopMusic(""); ?


Yes, I tried running StopMusic after CS_LoadCutscene.  But the CS_LoadCutscene was loaded from another script.

And yes to your second question.

.... I tried StopMusic(""); but no luck ... :(

#6
anakin5

anakin5
  • Members
  • 258 messages
The trick is probably to call StopMusic as soon as the cutscene start being played, and not when the cutscene start being load.
What I will propose has worked for me in one particular problem similar to yours. Not sure if it can solve your problem but you can try :

After CS_LoadCutscene, put :

[color="#99ccff"]event[/color] ev = Event(CUSTOM_EVENT_CUT_SOUND);
SignalEvent(GetModule(), ev);
[color="#99cc00"]//DelayEvent(GetModule(), ev, 2.0f);[/color]

Define CUSTOM_EVENT_CUT_SOUND in the engineevents.gda and handle it in your module core script. Use the StopMusic here.
The idea is to delayed the StopMusic after giving hand back to the engine. You can replace SignalEvent with DelayEvent if you need to delay the event a little bit more.

Modifié par anakin5, 13 février 2010 - 03:24 .


#7
Lady Olivia

Lady Olivia
  • Members
  • 374 messages
StopMusic doesn't work for you because "music/kissing/kissing_music" is sound, not music. Put:

StopSound("music/kissing/kissing_music")

just before the CS_LoadCutscene call. Worked like a charm for me. It's a bit abrupt, but better than the awful mixing. Thanks for the idea! :) 

EDIT: The way I solved it previously was like this: I took the kissing_music and cut it (with a nice fade-out) at 10 seconds or so, then replaced the original with mine in the cutscene itself. If you want to try it out quickly, you can download the manual install of my mod, and copy the music_cutscene_extra.fsb/.fev into your module core override: there are three versions there, 8, 10 and 12 seconds long.

Doing it through a script seems like a cleaner solution, but replacement music can have a fade out. Too bad there isn't a fadeout action for sounds in cutscenes. Or there is but I don't know about it. :whistle:

Modifié par Lady Olivia, 14 février 2010 - 03:16 .