How do I have one BG sound and many layouts

Get help using Construct 2

Post » Mon Sep 22, 2014 3:56 am

I have been away from C2 for a while ... and I have been trying over and over to figure this out but I forget..

How do I have one background (BG) sound looping EVEN when I go to several different layouts.
(and not restarting the same BG sound)

Help
Last edited by producermark11 on Tue Sep 23, 2014 12:54 am, edited 1 time in total.
B
35
S
10
G
4
Posts: 250
Reputation: 7,938

Post » Mon Sep 22, 2014 4:15 am

still not working consistently -- sometimes works . sometimes not ...aaarrggghhh
B
35
S
10
G
4
Posts: 250
Reputation: 7,938

Post » Mon Sep 22, 2014 5:34 am

set a global variable , play song based on value
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Mon Sep 22, 2014 5:37 am

OnStartOfLayout >
If tag "BGMusic" is not playing > Play BGMusic

So your music will start on any layout if its not already playing. Once the music has started, it should continue to play (if you have it looping) indefinitely.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Mon Sep 22, 2014 2:49 pm

Thanks ... now I remember .. much appreciated @Techniko

Here is a screen shot ... the 'code' input needs to be inverted (see the red X )
You do not have the required permissions to view the files attached to this post.
Last edited by producermark11 on Tue Sep 23, 2014 1:10 am, edited 5 times in total.
B
35
S
10
G
4
Posts: 250
Reputation: 7,938

Post » Mon Sep 22, 2014 3:56 pm

@Tekniko Thanks, this actually works :D
B
21
S
6
Posts: 244
Reputation: 2,665


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, R0J0hound, trance, yiuyiu6666 and 4 guests