How do i.. [song]

Get help using Construct 2

Post » Sat Jul 20, 2013 10:30 pm

Hi guys, i've a problem here..

my game starts on Menu Screen with a music..

till here it's all ok, i play my game(for about 20 seconds) and when the 'timer' gets to 0, the game go back to Menu Screen, BUT the song starts all again..

i not want that, the music needs to continue..

Thanks folks
B
9
S
2
G
1
Posts: 92
Reputation: 826

Post » Sat Jul 20, 2013 10:47 pm

You must be more specific.
However if the problem is what I think maybe this would be a solution.

If you start your music with "On Start of Layout" in your menu layout, all the times you will return to your menu the music will restart.

Instead, create another layout where only start the music and then go to menu layout with "go to layout". Now, agter playing your game, when you return to menu layout the music will continue.
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Sat Jul 20, 2013 11:20 pm

[QUOTE=parside] You must be more specific.
However if the problem is what I think maybe this would be a solution.

If you start your music with "On Start of Layout" in your menu layout, all the times you will return to your menu the music will restart.

Instead, create another layout where only start the music and then go to menu layout with "go to layout". Now, agter playing your game, when you return to menu layout the music will continue.
[/QUOTE]
Man, i think your idea should resolve my problem, i'll try


Thanks a lot
B
9
S
2
G
1
Posts: 92
Reputation: 826

Post » Sat Jul 20, 2013 11:26 pm

Another way could be, if you don't want make another layout, use a global variable. When you define it set it to 0. When you load the menu check if it is to 1, if not start music. When you move to your game set it to 1, so when you return to menu the music doesn't restart (because it start only if global variable is to 0).
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Sat Jul 20, 2013 11:46 pm

It worked using another layout!

thanks a lot man
B
9
S
2
G
1
Posts: 92
Reputation: 826


Return to How do I....?

Who is online

Users browsing this forum: Apollo14 and 27 guests