Hi
I've been working on the sound part of my game, and thus I've created an options button (only accessible in the main menu) to "toggle on and off" only the sounds that you would call music in the game. I thought it would be possible to go about this by creating a sprite on a global layer that every layout shares. This sprite (GlobalValues) has an instance variable assigned to it simply called music with a value of either 1 or 0. Pressing the button changes the value between 1 and 0.
Every layout (playable level) has trigger as follows:
_______________________________________________________________________________
+ System: On start of layout
----+ GlobalValues: Music = 0
-----> (no actions)
----+ GlobalValues: Music = 1
--------+ Audio: [X] Tag "Music" is playing
---------> System: Wait 1.0 seconds
---------> Audio: Play Stage.webm looping at volume -10 dB (tag "Music")
_______________________________________________________________________________
Apparentely this doesn't seem to work as expected on the start of layout with the GlobalValues variable music assigned with 0. Is it possible to create conditions based on global sprite variables (in this case on the start of layout) or am I just missing something in my framing of conditions?
If I seem to complicate the whole concept of disabling music, do tell me if there's a better way to go about it.
Thanks