R178 - 'Clone' doesn't keep all of the originals properties

0 favourites
  • 6 posts
  • So it's caught me out a few times. I've right clicked on an object in projects panel and selected 'clone'. However the new object doesn't always share all of the originals properties as some are set to the default value.

    Examples:

    I cloned a sprite with the wrap behavior set to wrap to viewport. The clone has the default option of wrap to layout.

    I cloned a spritefont. The clone has the default options char width and height 16, default char set, text "text", etc.

    I think happens with most things that are cloned.

  • It should work if you clone the object from within the layout view. -> Right click object: Clone object type

  • I dont seem to have the problem with most my objects (in terms of behaviours etc) , but when I clone a 'text' objext i get the same problem, it resets all the size, color, font etc etc, and I also get the same problem as above with regards to sprite fonts

  • I assume what happens is that when you clone from the project window it does not exist in a layout yet. So when you drag it into a layout the extra properties that aren't seen are added. However, those things propagate with the default value.

  • Closing as won't fix. You should clone objects by right-clicking objects in the layout view and choosing Clone from there; this way it knows which instance you want to clone from, and it correctly copies all properties. If you clone from the project or object bars, it doesn't create any instances, it only creates a new object type. Since there are no instances then there is nowhere to copy any properties to, and it's also ambiguous where to copy properties from, since you clicked an object type and not a specific instance, and the object type could have all sorts of instances with different properties. When you add an instance from the project bar for an object type which has no other instances, it simply uses the defaults. This is all by design and working correctly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley Ok, that's fine but I wonder how anybody is meant to know that they 'should' do it that way? I mean the shared terminology is confusing when they are both called clone but they do different things. It maybe better to call the one in the project browser something else like 'duplicate' in my opinion. I raised this in the general forum before posting here to make sure it was issue and it seems that it wasn't just me wondering why properties weren't being copied.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)