How do I continue audio to play through levels?

Get help using Construct 2

Post » Sat Nov 22, 2014 7:25 am

Hi there,

there a some topics on this issue, but I can't seem to find the right solution...
In my level 1 I have a 'on start of layout' which plays my audio.
Whenever I go to the second level though, my audio starts playing from the beginning again.

I guess this is caused by the fact that I include my first event sheet in the second one...
Any way of solving this?

Thanks for your help!!
Image
B
54
S
24
G
12
Posts: 96
Reputation: 10,316

Post » Sat Nov 22, 2014 7:41 am

You can easily solve this by adding and inverting the audio condition: is tag playing. You will need to assign a tag to the audio, for instance call it music1. You need to add this tag on the action that plays the audio and on this condition. That way if the audio with this tag is already playing, it won't start it again.

You can learn more about the audio object and tags here: https://www.scirra.com/manual/109/audio
B
74
S
28
G
17
Posts: 256
Reputation: 15,125

Post » Sat Nov 22, 2014 9:22 am

Here, add is any playing. and invert it. :)

Image
B
11
S
3
G
1
Posts: 419
Reputation: 1,782

Post » Sat Nov 22, 2014 6:17 pm

Yes!
Got it working all right!

Thanks for the help guys!
Image
B
54
S
24
G
12
Posts: 96
Reputation: 10,316


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, Rable and 8 guests