When Duplicating Layouts

Discussion and feedback on Construct 2

Post » Sat Dec 08, 2012 7:22 pm

When duplicating layouts, I would like the new layout to copy the layer locks as well.

I have a couple of generic layouts (templates) that I copy (duplicate) throughout the project. There are a few layers within the template layout which contain visual design aids (opaque boxes to section off areas of the interface) which are invisible at run-time. I keep those locked so that they don't accidentally move, delete, etc them.

At the moment, if I duplicate the layout then the layers are duplicated but the layer locks are not the same as the originally duplicated layout.

Thanks for reviewing my request.cangelodawg2012-12-08 19:24:33
Posts: 27
Reputation: 2,945

Post » Sun Dec 09, 2012 11:05 pm

I agree, it's a little annoying. It would be nice if this was supported and/or layout inheritance was bought over from Construct Classic.

One way around this that I tend to use (which does require a little bit of fussing about) is:

1) Backup your project.
2) Browse to the project on your computer. There will be a folder called "Layouts".
3) Find the layout you want to duplicate. There will be a .xml and a .uistate.xml file, for example Level1.xml and Level1.uistate.xml
4) Copy and paste these two files, then rename them to the new layout. For example, rename the copies Level2.xml and Level2.uistate.xml.
5) Open Level2.xml and change the following line to the new level name:


6) One last step - Browse to the .caproj file in the root directory and open it with notepad. Scroll to the tag:

        <layout-folder expanded="1">
7) In here create a new line for your new level:

            <layout-folder expanded="1">

8) Restart C2 and it should display the new layout fully duplicated.

It might seem like a lot of steps, but it only takes a few seconds once you have done it a few times.

Hope this helps!boolean2012-12-09 23:06:08
Posts: 244
Reputation: 3,462

Post » Sun Dec 09, 2012 11:18 pm

I agree that I also would like the layers' configuration to be copied, as well as the attached event sheet configuration.

When I duplicate layouts, I tend to also have set the layers in a certain way, and set a (single) common event sheet.
It breaks a bit the workflow because duplicating layouts happen when I'm making levels based on the mechanics I've already coded.
And each duplicate needs a few "previous" preparation before really going in "level design mode".

@Ashley could it be either a change, or an added IDE option that could (in the preferences or project's configuration, "type of duplication") ?
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Posts: 7,319
Reputation: 87,487

Post » Sun Dec 09, 2012 11:43 pm

I just want to see layer inheritance. Nothing like making a layer change across 50 levels to keep a man humble (and insane).
Posts: 3,191
Reputation: 32,679

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests