How do I play a song during several layouts?

Discussion and feedback on Construct 2

Post » Fri Jan 06, 2017 7:27 pm

I have a problem, the music that I played in my game restarts every time I pass the level. How do I fix this and make it play during a certain amount of levels? Example: From Level 01 to level 10
B
9
S
3
Posts: 10
Reputation: 645

Post » Fri Jan 06, 2017 7:33 pm

The music will continue playing until something in your events makes it stop. Are you restarting the layout at the end of each level or something like that?
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Fri Jan 06, 2017 7:49 pm

na mudança de nivel a musica reinicia e eu nao quero para isso acontecer, quero que ela prossiga.
B
9
S
3
Posts: 10
Reputation: 645

Post » Fri Jan 06, 2017 7:50 pm

Burvey wrote:The music will continue playing until something in your events makes it stop. Are you restarting the layout at the end of each level or something like that?

na mudança de nivel a musica reinicia e eu nao quero para isso acontecer, quero que ela prossiga.
B
9
S
3
Posts: 10
Reputation: 645

Post » Fri Jan 06, 2017 7:50 pm

Burvey wrote:The music will continue playing until something in your events makes it stop. Are you restarting the layout at the end of each level or something like that?

In the change of level the music restarts and I do not want this to happen, I want it to continue.
B
9
S
3
Posts: 10
Reputation: 645

Post » Fri Jan 06, 2017 7:58 pm

Can you post your capx?
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Fri Jan 06, 2017 8:08 pm

Burvey wrote:Can you post your capx?
no my friend :( . But analyze the following situation: you have a game with several levels and each level is in a different layout. How do I make a song play continuously throughout all levels without restart?
B
9
S
3
Posts: 10
Reputation: 645

Post » Fri Jan 06, 2017 8:20 pm

There is something in your layout that is making the song stop or restart, otherwise the music would continue playing on its own. My guess would be that you are doing something like this:

At start of layout -> Play music

If that is the case, what you need to do is add a tag to the music that you are playing, then add another condition to your event like this:

At start of layout
Audio tag "music" isn't playing -> Play music

OR alternatively, you could just remove the At start of layout -> Play music from all but the first layout.
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Fri Jan 06, 2017 8:30 pm

If you want a music to play all time. Just make a new layout and set the music in it !
It will play in all other layouts without any problem and without stopping !
Thats what I did before :)
B
9
S
2
G
1
Posts: 50
Reputation: 1,185

Post » Fri Jan 06, 2017 8:50 pm

Burvey wrote:There is something in your layout that is making the song stop or restart, otherwise the music would continue playing on its own. My guess would be that you are doing something like this:

At start of layout -> Play music

If that is the case, what you need to do is add a tag to the music that you are playing, then add another condition to your event like this:

At start of layout
Audio tag "music" isn't playing -> Play music

OR alternatively, you could just remove the At start of layout -> Play music from all but the first layout.

THANKS MANNN! <3
B
9
S
3
Posts: 10
Reputation: 645

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 18 guests