Layout Sheet inheritance?

0 favourites
  • 5 posts
From the Asset Store
- This pack is suitable for shooting games, running games, platform games, and side-scrolling...
  • 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!

  • 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

    <img src="smileys/smiley1.gif" border="0" align="middle" />

    <font color=blue>EDIT</font> 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 <img src="smileys/smiley17.gif" border="0" align="middle" />

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)