If condition and then action

Can you give an example if it’s possible. I just don’t want to mess anything up.

Also don’t forget to credit Mr Matyas if you use his music and be sure to check out his website for more great music and sounds.

Here is how I did it, I just pause it if there is a sound playing. Then you won’t have to worry about resuming it if it’s off only if it was playing to start with.

Is this in the events where the pause menu conditions and actions are

Yeh that’s my entire events for scene 1.
Here is the new Toggle events

1 Like

First scene, more stuff that pause does so you can see it better.

1 Like

Second scene.

New project with sound and music toggle switch.
https://drive.google.com/file/d/1Jr7qTl8ylUZsSrVDjOfi5R33gZqQdMXH/view?usp=sharing

1 Like

@Lucky-j The pause menu events are in a external events called Game Logic. It has all the main level and UI events. Also, the sound events aren’t working. Also the pause button is on an external layout, So yeah!!

Hmmm sounds like a hot mess. Got a link it might be faster if I get in and edit it.

Tbh, I can’t let you edit it. I would but it wouldn’t let me.

Hmm and it’s saying I’m replying too much in this topic. Try to get the file I gave you I bet you can figure it out if you compare it to yours.

Oh I didn’t have the boolean variable in the sub–event in the beginning scene thing.

1 Like

The sound toggle works and stuff but it won’t turn off the sound. I’m gonna have to look into this.

Ok, the sound is just played. It isn’t in contact with the Toggle Logic. Let me show you the Game Logic and see if you can.
The sound is on channel 2 btw




Screenshot 2023-02-27 6.18.34 PM

So if you could possibly give some examples of this and the pause menu examples in one external event

Check how I have my sound effect playing every time the user released the p key in those screen shots. I put it in a separate box with the condition bool SoundOff is false, play sound effect on a channel.

Here I made a suggested mockup of your event to illustrate better.

image

@Lucky-j Do I make a new sub-event or no?

I just didn’t have enough room to put The boolean value of global variable SoundOff is false.

Yeh but line it up with the rest of your sub event block like the mockup.

Maybe it would be easier for you if instead of not playing sounds, you just go into your toggle logic and on your sound toggle set it to do 0 volume if true and 100 volume if false on channel 2 or something like that

@Lucky-j So where is the boolean value at? Can you maybe try giving another picture. You’ve given best help!!! :smiley:

Also on the sound thing you put in the edit.

Here do this in your toggle logic instead I think it will be easier in your game.

That’s the sound toggle not the music one.

@Lucky-j Yeah, are you able to give the boolean you weren’t able to put? I hope it’s not too much!