Adding sounds

Get help using Construct 2

Post » Sat Nov 08, 2014 1:34 am

Can someone advise how to stop the background music from the first layout and start the music for the second layout at the same time? My project just keeps playing the first layout/level music all the way through.
B
4
Posts: 3
Reputation: 208

Post » Sat Nov 08, 2014 2:06 am

............
You do not have the required permissions to view the files attached to this post.
Image
B
54
S
22
G
7
Posts: 1,405
Reputation: 10,289

Post » Tue Sep 08, 2015 6:47 am

spffb wrote:Can someone advise how to stop the background music from the first layout and start the music for the second layout at the same time? My project just keeps playing the first layout/level music all the way through.



It bugged me that this wasn't directly answered...

The simple answer is:
On Touch/Mouse ~ Audio ~ Stop "MenuBGM"

The slightly less simple answer:
Here's an ordinary scenario- you have a menu select screen, and when you click on Level 1-1, you want
1. The Menu Layout to go away, and
2. For Level 1-1 to load WITHOUT having the Menu music still playing.

I sometimes have a problem putting audio commands inside of "On End of Layout" Actions, so I put the Stop "MenuBGM" Action AND the Go To Layout Action in the button.

More specifically, I create a sprite called MenuSelect, and attach the various kill commands to that button.

That way, I can make a menu with several level options, each one leading to a different layout. The MenuSelect Sprite is then used to "Highlight" the various levels, and whenever the player "clicks" on the level they want to go to, they're actually clicking a conditional MenSelect button. That way you get your kill switch without having to rely on the On End of Layout condition, which doesn't always provide the expected result.

But I'm still learning, too!
B
4
Posts: 8
Reputation: 223

Previous

Return to How do I....?

Who is online

Users browsing this forum: dieblume86, Kagubro and 2 guests