Continuous background music while skipping through layouts.

Get help using Construct 2

Post » Tue Feb 02, 2016 7:42 am

Hello, I have a question, if it is possible to make music play, even through I'm changing layouts?
Music always starts at the beginning, when i change the layout. Can you help me, please?
B
5
Posts: 8
Reputation: 250

Post » Tue Feb 02, 2016 10:07 am

If sound or music tag is not playing, play sound.
Image

Now this is on a sheet called "PalacesSharedSheet" and all the temples and palaces use this particular line of code so no matter what frame you are in, each frame's sheet will call on (via include) PalacesSharedSheet and thus have this music code included.

In many cases, layouts will need different tweaking, so each layout SHOULD have it's own Event Sheet, but that doesn't mean some things will carry over as common (music, sound effects, player controls, etc). Most of my sheets include "Platform" for character, TownSharedSheet (or Palaces) for similar things in towns (or palaces), and a few others. The layout "TownA1" has a sheet called "TownA1Sheet" and the same for "TownA2" having "TownA2Sheet". Both TownA1Sheet and TownA2Sheet have "TownSharedSheet" with shared things like the character's motions (on his own sheet, included in TownSharedSheet) and music and sound effects.
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Tue Feb 02, 2016 10:27 am

Maybe the problem is that you are using "on start of layout" to initiate the music. Try to use other trigger (trigger once... for example) to starts it.
B
73
S
13
G
2
Posts: 990
Reputation: 6,996

Post » Tue Feb 02, 2016 2:40 pm

roracle wrote:If sound or music tag is not playing, play sound.
Image


Can you please upload the picture once again somewhere else? I can't open it...
B
5
Posts: 8
Reputation: 250

Post » Tue Feb 02, 2016 9:55 pm

Yep! Here ya go!

https://dl.dropboxusercontent.com/u/111 ... icloop.png

It's best to use "is not playing". This with "stop all sounds" or whatever it is in the editor for the starting frame of a new area that requires a new song. This way in case another song is playing and you need to switch to a new song, it will have the "stop all" going before heading into the new song.
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Wed Feb 03, 2016 7:47 am

Thank you, guys :) I'm still learning and you were really helpful ^^
B
5
Posts: 8
Reputation: 250


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, ColombageEnPLS, doriHOG, rustomatic, zenox98 and 3 guests