How do I turn music off but leave fx sounds on

Get help using Construct 2

Post » Mon Feb 02, 2015 10:55 pm

Sorry guys newby question? I'm having trouble with music and sound fx.
I have followed Ashleys C2 tut on how to add a mute button and everything works fine but the music stops as well as the fx. I want to have the music playing when the fx is turned off and only turn off the music if a second button is pressed.
B
6
Posts: 20
Reputation: 348

Post » Mon Feb 02, 2015 11:02 pm

When you call the Play function from the Audio object for the music, add a tag.
After that just call stop using the same tag.
As for the sound effects, make a global variable(You can call it Sound). Set the variable to 0 when the sound effects should be off and set it to 1 when it should be on. Whenever you need to play a sound effect, test if this variable equals to 1.
B
3
Posts: 3
Reputation: 183

Post » Mon Feb 02, 2015 11:21 pm

Hi Gogafem
Thank you for the help I will give that ago.
B
6
Posts: 20
Reputation: 348


Return to How do I....?

Who is online

Users browsing this forum: Husui, MonDieu, Ratmaster and 1 guest