Global pause menu?

Get help using Construct 2

Post » Tue Aug 28, 2012 11:35 pm

Hi all,

I was just wondering the best way to create a global pause menu? I'm looking at having 100+ levels, and don't want to update each one when making changes to the pause menu.

It looks like there was something called inheritance layers in CC. Is there a similar way to achieve this in C2?

Thanks!
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Wed Aug 29, 2012 12:03 am

do global object instance and call it as "Pause Button". Make a specific event sheet for the pause function, place the button on a layout (you don't need to care about this layout, it's only to create the instance on the runtime).

On the event sheet, make it create the button where you want, then, make it become invisible with events and make some event keys to activate the visibility.

Call the event sheet on your stage event sheets.

Well, that's it, if you need more specific description, you should share your CAPX, so, We can make it for you.
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,211
Reputation: 18,480

Post » Wed Aug 29, 2012 2:04 am

Thanks for the reply!

My menu comprises of multiple buttons and other visual elements. Are you suggesting I create this dynamically with the event sheet rather than creating a designed layout?
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Wed Aug 29, 2012 2:09 am

That's probably the best thing to do at the moment really, until we get something like inheritance/global layers.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Aug 29, 2012 2:14 am

Ehhhh... That's gonna be annoying for me, too. Better than having to re-make the menu in every layout I guess. Thanks for the idea, I hadn't thought much about it yet.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Aug 29, 2012 10:10 am

Okay thanks. That's not too much of a problem, and probably how I'd do it with traditional coding anyway :)
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Wed Aug 29, 2012 10:34 am

Even if inheritance/global layers aren't due any time soon I think the option to just copy and paste layers from layout to layout would make it a little easier. It'd still mean you weren't having to draw the same layer over and over again.
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325

Post » Thu Aug 30, 2012 10:19 am

It would, but I'm working with a pipeline that has regular art updates. I don't really want to be swapping stuff out for every level on a regular basis.
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Thu Aug 30, 2012 1:28 pm

Ye it's not really practical. Even setting a pause menu through variables, co-ordinates and events isn't ideal when theory is put into practice. @Ashley can you confirm if inheritance layers are going to make an appearance at some point?
ImageImage
Mr. Green - Platform/puzzle game out now!
B
24
S
7
G
1
Posts: 222
Reputation: 3,325


Return to How do I....?

Who is online

Users browsing this forum: christina and 20 guests