Aller au contenu

Photo

Stopping sound/music after cutscene


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

#1
tmp7704

tmp7704
  • Members
  • 11 156 messages
I have a sound object from the standard campaign added to a short cutscene, however the sound is much longer than animation and persist afterwards, mixing with other sounds which are triggered later. In this particular situation it is undesirable.

Is there a way to stop that particular sound through the script after the cutscene is done? I have tried StopSound() and StopMusic() calls supplying them the "event name" for the sound shown in the object inspector but it didn't seem to do anything.

#2
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
You might need to use the full path to the event name (you need to for PlayMusic so it would make sense).

#3
tmp7704

tmp7704
  • Members
  • 11 156 messages
Aye, i used the full name in my attempts but it didn't work...

the sound in question is pre100cs_cailan_charge/cutscene/charge don't know if that makes any difference.

Modifié par tmp7704, 03 juin 2010 - 02:16 .


#4
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
Is there a way to stop all sound using StopSound? You could try that right before your cutscene ends.

#5
tmp7704

tmp7704
  • Members
  • 11 156 messages
Only the StopMusic() call is said in its help file to stop all music (which i presume happens if it's supplied empty string as argument) so it'd seem StopSound() doesn't have that. But in the meantime i've experimented with starting that particular sound before the cutscene from the script and i can't get it to play this way too, either with sound() and music() call. I wish the dang thing wasn't so opaque...

update: well, i pretty much gave up on that in the end. Just took 20 sec clip from the original audio and made separate event for the cutscene out of that. As a bonus it can fade out more smooth this way... still, would be nice to know why it wouldn't work in the first place.

Modifié par tmp7704, 03 juin 2010 - 07:04 .


#6
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
I could never get PlayMusic() to work myself even if others apparently have. The whole thing seems very flakey.