How do I pause all sounds at once?

Get help using Construct 2

Post » Tue Jan 27, 2015 6:04 pm

In my current demo, I've got multiple sounds that can occur at the same time- BGM, death fanfare, sound of a bullet, sound of enemies getting hit...

When I bring up the pause menu, I would like all sounds to pause, and to resume when I unpause.
The Sound.Set Paused action only lets me pause individual tags. Do I need to add a separate action to pause, and resume, each individual tag?
Here's how I'm currently doing things:
pauseDialog.png

But I'm looking/hoping for a Sound.Set Paused (All) command.
You do not have the required permissions to view the files attached to this post.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Wed Jan 28, 2015 12:14 am

You can set the audio time scale to 0.
Click on the audio plugin, go to the properties bar and set Timescale to ON.

OR

You can set the Audio to Silent when paused
Then set it to Not Silent.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Wed Jan 28, 2015 2:38 am

I think the first one is going to be more like actual pausing. But, I mean... I've got ideas for hacks and all, but why isn't there a "Pause All" option?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Wed Jan 28, 2015 3:21 am

Also, @A0Nasser, how do I set the Audio Timescale to 0? Is it separate from the system timescale? Because setting Timescale Audio On (Sounds and Music) does not seem to have worked with my existing pause code (as seen above)
Last edited by Unnatural20 on Thu Jan 29, 2015 8:15 am, edited 1 time in total.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Thu Jan 29, 2015 3:31 am

Bump?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Thu Jan 29, 2015 7:59 am

There's no "pause all" action for audio so I guess that (using individual pause actions for each tag) is probably the solution.

Also tried the audio time scale, seems there are some things missing to be done before it works?

Use the @ sign with the username to send a notification to that user so he can remember this thread.
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Thu Jan 29, 2015 10:07 am

Doesn't the system set time scale action automatically pause all your audio?
B
12
S
2
G
1
Posts: 34
Reputation: 741

Post » Thu Jan 29, 2015 6:12 pm

It does not, @Mathijs90. Specifically, I have a sound playing at a mobile sprite that remains looping as long as the sprite exists; it is not paused by setting Time Scale to 0.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sat Jan 31, 2015 7:32 pm

Bump. Is it possible that because the audio is attached to an object, the time scale doesn't work?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sat Jan 31, 2015 11:51 pm

If you click on an audio file in the projects window and then take a look at its properties - there is a "timescale audio" feature - which is off by default (I think) - if you set it to on it will conform to global timescaling.
B
67
S
25
G
4
Posts: 212
Reputation: 7,084

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 8 guests