How do I use event from one layer in another layot

Get help using Construct 2

Post » Tue Aug 23, 2016 6:53 pm

My project has a total of 6 layouts. One layout (start screen) will have buttons/clickable text that takes the user to the appropriate layout (1 link for each of the 5 different layouts). However, I want the user to have to visit the layouts in a certain order. Right now when the project is loaded the first layout they need to visit is set at 100 opacity, and all the others are at 50. I want each link to only work if they're at 100 opacity. I've tried setting it up so a button that appears at the end of the first required layout will take the user back to the start screen AND set the opacity for the next layout at 100. I've been able to get the button to take the user back to the start screen but I can't seem to get the next layout link to turn to 100 opacity. Any suggestions?
B
6
S
1
Posts: 16
Reputation: 384

Post » Tue Aug 23, 2016 7:03 pm

I'm a little confused whether you mean layers or layouts, but, maybe try using a global variable to signal when each one needs to be at whichever opacity.

E.g.
Player finishes level 1 --> Set Global Variable to 2
If Global Variable = 2 --> Set opacity of level 2 to 100
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Post » Tue Aug 23, 2016 10:32 pm

Use a function and send in a parameter for each button that is pressed.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Wed Aug 24, 2016 5:56 pm

Thank you! I've got it working now.
B
6
S
1
Posts: 16
Reputation: 384


Return to How do I....?

Who is online

Users browsing this forum: leena222, nahima, tatogame and 20 guests