How do I create music on/off trigger?

Get help using Construct 2

Post » Wed May 21, 2014 12:06 am

Hello!

So, I have a button to stop music and other to turn it on back again. Now, how do I let C2 know that when it creates the layer 2 e.g., it remembers that the music was set to off, and that it should not play it?

Thanks!
B
25
S
8
Posts: 81
Reputation: 1,691

Post » Wed May 21, 2014 7:56 am

I am not sure what you mean by layers in terms of music, but you should use a variable. For example, when player turns music on, set VariableMusic to 1, and if they turn it off, set VariableMusic to 0. Than save that variable to webstorage so that everytime you start the game, the setting is saved.
B
42
S
20
G
31
Posts: 685
Reputation: 20,221

Post » Wed May 21, 2014 10:27 pm

rekjl wrote:I am not sure what you mean by layers in terms of music, but you should use a variable. For example, when player turns music on, set VariableMusic to 1, and if they turn it off, set VariableMusic to 0. Than save that variable to webstorage so that everytime you start the game, the setting is saved.



Thank you!
B
25
S
8
Posts: 81
Reputation: 1,691


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 2 guests