Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Volcan on Wed 29/01/2014 01:51:11

Title: Sound effects still playing if cutscene skipped (Solved)
Post by: Volcan on Wed 29/01/2014 01:51:11
I worked on Space Trash today.

I noted if the player skips the cutscene, sound effects still playing.

Is there a way to prevent sound effects playing if the cutscene is skipped?
Title: Re: Sound effects still playing if cutscene skipped
Post by: Crimson Wizard on Wed 29/01/2014 07:10:40
Put this somewhere before EndCutscene();
Code (ags) Select

if (Game.SkippingCutscene)
{
   Game.StopAudio(eAudioTypeSound); // replace the audio type if needed
}


Alternatively, you may also check this property during cutscene to know if you should or should not start sounds:
Code (ags) Select

if (!Game.SkippingCutscene)
{
   aSound1.Play();
}
Title: Re: Sound effects still playing if cutscene skipped
Post by: Volcan on Wed 29/01/2014 14:42:25
It works!

Thank you for the advice.