restart music on returning to layout

Get help using Construct 2

Post » Sun Mar 12, 2017 11:39 am

Apologies if this is relatively SIMPLE puzzle, but i need help understanding this [PLEASE].

I have 2 layouts:
Layout 1/ button 1 > music starts playing on load
>> click button 1 to navigate to layout 2
Layout 2/ button 2 > music stops playing on load
>> click button 2 to navigate to layout 1
The MUSIC fails to start automatically.

Any help you be appreciated. Here's my file:
[url]robfreeman.co.uk/test/whyowhy.capx[/url]

Thanks,
Roberto
B
5
S
2
Posts: 64
Reputation: 632

Post » Sun Mar 12, 2017 12:02 pm

Code: Select all
layout1 -
conditions
if music "tag1" is not playing stop "tag2" play song "tag1" from start looping
and remove everything you have from other layouts.

layout2  if  has different music playing.

if music "tag2" is not playing stop all play song "tag2" from start looping

layout3 4 5 6 etc same as layout2.


remove any press on button play. this is on start of layout conditions. for button u only need mute sound /music /volume up down. rest should be in layout start.

B
78
S
23
G
69
Posts: 1,354
Reputation: 44,027

Post » Sun Mar 12, 2017 1:28 pm

On Start of Layout1: Play Music "music name"
Button1= 1

Use a global variable to determine if music is to be played and global variables work on all layouts unless you reset global variables.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830


Return to How do I....?

Who is online

Users browsing this forum: draiza, LunaticCat, Yahoo [Bot] and 5 guests