How do I Not Delete Everything???

Get help using Construct 2

Post » Mon Feb 29, 2016 5:49 pm

OK, a bit of a dramatic post title but here's the thing. I have completed layout 1(called Level1) and duplicated it to use as a template for layout 2 (called level 2). The Objects box clearly states "All 'level 2' objects" but when I edit an image in the Objects box for level 2 it also edits the corresponding image in level 1. Worse, if you delete an object in the level 2 Objects window, it deletes the original in level 1. So, can somebody tell me how I can duplicate a layout and edit the objects in there so that they ONLY change in the layout I am editing them in?

Because if I have to add a whole bunch of new objects and cannot remove any of the existing ones that they are designed to replace, what is the point of duplicating a layout? You're only creating an ever-increasing list of objects that have no value in the current layout but that you can't remove. How do you remove the symbolic link to the original object in layout 1?

Any guidance gratefully appreciated...

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300

Post » Mon Feb 29, 2016 6:49 pm

You'll need to clone the objects you want to change as a separate object, then place the new one on your second layout.

To remove the original object from your second layout only and not the first, delete it from the layout view, not the object/project bar on the right.

Also you can filter your objects bar to only show objects that exist on the current layout by right clicking - filter objects.

Objects existing globally across all your layouts can be very useful, but in your case if you want your layouts to have different objects, you should actually create different objects. You can make the new ones based on the old ones by cloning objects.

Here are the relevant manual entries:

https://www.scirra.com/manual/39/project-bar
https://www.scirra.com/manual/41/object-bar
https://www.scirra.com/manual/43/layout-view
Mistakes were made.
B
53
S
27
G
114
Posts: 1,699
Reputation: 64,446

Post » Mon Feb 29, 2016 10:11 pm

That's very useful, thank you :)

But... you can CLONE an object but you can only DUPLICATE a layout? How then would you use one layout as a template for a new one? Or have I once again missed the point?

Many thanks in advance :)

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300

Post » Wed Mar 02, 2016 1:27 am

A layout is just a space where you put the objects. You duplicate a layout in order to keep the same layers and objects, and then you add new objects or move them as needed. The animations of an object are global, but everything else (variables, size, transparency, position, etc) is unique to each copy of the object

The objects window is global to the entire project, the only way to see the objects in a layout basis is to use the Z Order bar
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Wed Mar 02, 2016 5:03 pm

It should also be noted that cloned and duplicated Sprites use the same underlying image, so if you are changing cloned sprites it will change all of them, I believe.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed Mar 02, 2016 9:51 pm

gumshoe2029 wrote:It should also be noted that cloned and duplicated Sprites use the same underlying image, so if you are changing cloned sprites it will change all of them, I believe.

All you have to do is check the name of the object. If it has the same name, it's the same object. If it has a different name (when you clone the name gets a number added to the end) it means it's a different object
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Thu Mar 03, 2016 4:46 am

Before you do too much, remember that if you select an object from the Objects or directly in the layout, you'll change the values of just that instance or instances. If you select it in the Project bar, it will select all of them in the game (globally) and change all of them. So there shouldn't be a much reason to duplicate a whole ton of objects when you can change the values in each of them as instances.

If you really are talking about clones/duplicates, then ignore this. I just don't want you to screw your project over by not being clear on instances. Also, make a backup.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Fri Mar 04, 2016 9:41 am

Many thanks, people, for your replies. It was all very helpful. Finally, the best advice was

C-7 wrote:Also, make a backup.


I backup with auto-save, with timed backups and randomly whilst working every few minutes, and every night I do a differential backup to external media. Better to have terabytes of untouched data than a preventable crisis. I've learned the hard way that nothing prevents cardiac arrest better than having a current backup!

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 21 guests