How do I import layouts from other c2 project?

Get help using Construct 2

Post » Sun Oct 16, 2011 3:30 pm

Hello scirra community,

I'm doing a game with my team, but we are having a hard time importing layouts from each other's pcs. Why split the work between people, so one got level design and other got into the programming stuff. Now we have 2 layouts (one with the level, the other with the code) and we are having a hard time turning both into one layout.

We saved both projects as "project folders" (for collaborative development).

Is there something we're missing here?
B
50
S
16
G
7
Posts: 59
Reputation: 6,365

Post » Mon Oct 17, 2011 6:53 am

There's normaly no "automatic" way yet.
Open both project in a single instance of C2 (open programming first, then level design).
You can copy the objects to your recipient project. (let's say level design into programming)
Make sure you copy all objects from Level design's layout, have the correct names etc.
Then go in the event sheet of level design select the events (making sure all the objects required are created in the recipient project (audio, mouse, keyboard, sprites with correct names/instance variables, etc...)).
Copy them, paste them in the recipient event sheet.

Make sure that objects have different names in the project (so that you won't try to copy an instance of a sprite named Player with an instance variable "Health" onto a Sprite instance Player with an instance variable "Name" for example).
Local variables may need to be done in the recipient project manually, before copy/pasting events (a yellow tooltip should let you know about this "difference of variable scope", something like that).

It can be tedious (depending on the quantity of objects/events) but for now, this should be the road to take.

It depends on the setup of your project.
In the end, it might be easier to copy the events from programming into level design (considering sprites in programming are supposed to be placeholders whereas level design has the correct animation frames).
As said earlier, just make sure that the objects the events are refering to are already present in the destination project/layout.

I hope it helped.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sat Nov 12, 2011 3:47 pm

I just realised I never responded this post.

Thanks Kyatric! It's a lot of work but works well. In time, this will be much easier =]
B
50
S
16
G
7
Posts: 59
Reputation: 6,365

Post » Fri Nov 01, 2013 3:48 pm

is there ever going to be an easy way to copy events and layouts with their assets into another project?

B
7
S
2
G
1
Posts: 24
Reputation: 1,277

Post » Tue Nov 05, 2013 7:28 pm

I have this same challenge too, its quite hectic having to copy and paste objects and events. For me, if u don't copy the global variables first, the other events won't copy (so u can't simply copy and paste all at once). I hope scirra looks into this soon
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Tue Nov 05, 2013 7:31 pm

Another issue is everything copies into one layer (for the layout) if u want to do all at once
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Sun Nov 17, 2013 10:39 pm

Yes, it's hard especially when you have everything set just the way you want it. A function like this would make adding other levels much easier.

Just copy, change a few things and you just made level 2 and made it a little harder.

Hope to have this soon, but still an amazing program.
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
23
S
9
G
1
Posts: 326
Reputation: 3,349

Post » Wed Nov 27, 2013 2:10 pm

@ALLMarkMade

hi m8! In your case, wouldn't just duplicating the layout work (inside the same project)?
B
50
S
16
G
7
Posts: 59
Reputation: 6,365

Post » Wed Nov 27, 2013 4:18 pm

yes it would and I thank you I was just reinforcing the point and mentioning that as well. I was not sure if either were possible at the time of the comment.what

Thanks
Check out my latest game RAPID-TAPIT. Get your Fingercise on with this one. A steady Tap is all you need to score points. Lift a finger and see what you can do...

Image

ALLMarkMade Designs
B
23
S
9
G
1
Posts: 326
Reputation: 3,349

Post » Mon Sep 21, 2015 4:19 am

I just managed to do that outside Construct, but cannot guarantee if there will not be any problems (have not tested it yet) so create a backup.

2 steps:

1. In project directory there is directory "layouts". You have to copy XML file of desired layout (t is called same as layout), from project you want export from to target project.

2.You have to edit .caproj file of your project. Find "<layout-folder>" and below you will see all existing layouts. Here you have to add new line with new layout, composed same way as other layouts.
B
12
S
6
G
2
Posts: 99
Reputation: 1,727

Next

Return to How do I....?

Who is online

Users browsing this forum: mercuryus, mystazsea and 16 guests