Layout Sheet inheritance?

Discussion and feedback on Construct 2

Post » Fri Oct 05, 2012 11:14 pm

Hi all

I'm starting to build out the levels in my game and I'm a little confused about the Layout sheets.

I've been working on one sheet this whole time which contains ~15 sprites on the page (outside the layout so at least one version of the object exists) and about 10 layers (mostly for menus).

I went to create a new level and it occurred to me that all those objects and layers now only apply to that single layout. I have code that references layers by name so I would need to setup my layers in the new level exactly the same as the first, along with ensuring all sprites are included. Now while I could copy+paste my first level and use that as a base, if I ever add/remove a layer/sprite I'd need to do that action across all levels.

Am I misunderstanding how layouts work? If each level is a Layout sheet, how do you manage layers and base sprites across all levels? Is there a way I can inherit a layout like an event sheet?

Cheers!
B
24
S
4
G
1
Posts: 244
Reputation: 3,462

Post » Fri Oct 05, 2012 11:18 pm

Open the 2nd layout, then choose the event sheet of the 1st layout at the layout properties window to the left, under the "event sheet" tab. This way, you're using the same event sheet for both layouts


EDIT also, i'd recommend that you create a separate layout for the sprites. name it "dumpster" or whatever you like, and never use that layout ingame.
that'll help you organise things and avoid unwanted sprites in playable layouts Lobo932012-10-05 23:25:46
B
7
S
2
G
1
Posts: 32
Reputation: 1,089

Post » Sat Oct 06, 2012 1:35 am

1) The event sheet isn't so much an issue as the layers and sprites in the layout sheet.

2) So if I include one 'bullet' onto my dumpster layer, construct wont complain that no instances of that sprite exist? If I'm understanding correctly that sounds very handy. Does this work the same for layers? boolean2012-10-06 01:36:52
B
24
S
4
G
1
Posts: 244
Reputation: 3,462

Post » Sat Oct 06, 2012 1:42 am

It's just "Layout", not "Layout Sheet". Saying layout sheet makes it easy to confuse with event sheet.

Your objects are available from anywhere in the project, yes. Layers do not work this way, they are tied to the layout they were created in.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Sat Oct 06, 2012 3:32 am

You're right, sorry about the terminology.

If objects are available anywhere, that's great. It's a little strange to not have global layers though, especially if you have a high number of them and 50+ levels. Anywho, if that's how it is, that's how it is.

Thanks!

- edit - Just found an old thread saying 'Inheritance Layer' was a feature in CC. Looks like as of 31 Mar 2012, Ashley added it to his TODO list.boolean2012-10-06 04:50:05
B
24
S
4
G
1
Posts: 244
Reputation: 3,462


Return to Construct 2 General

Who is online

Users browsing this forum: mystazsea and 13 guests