0 Favourites

How do I Create a New Object From Existing

  • Hello!

    This seems like a very simple task but I am having trouble figuring this one out. I want to copy an object in my tree view so that I can make multiple versions with variations to behavior and instance variables.

    For instance, I have an enemy, and I want three types; I'd like to copy the first one and then make changes.

    The issue:

    When I clone the object in the tree view the cloned object doesn't have the same properties as the original.

    How can I create a new object from the existing object that copies over all the behaviors and instance variables?

  • There is a difference between clone object and copy object (See manual for differences). You'll want to use copy.

  • Thank you for the reply.

    I can definitely see that what I have tried is wrong, and I have found numerous other ways to do the wrong thing.

    Still haven't found a way to accomplish my goal here yet though.

    Everything I see on copying, cloning, shortcut key strokes, etc. all lead to creating new instances of an object type.

    What I am trying to do is copy the object type to create a new object type. I have explored numerous methods of copying/cloning and researched the manual extensively. Can't believe I haven't found the answer yet, starting to question my research skills.

    As you can see in the image below, the only immediately available option on the object is clone. Copy isn't even listed in the dropdown. There is a copy and paste option on the top left of the editor but this just copies the instances.

  • Oh, I "think" I understand what you are trying to do now. If so, what you need to do is add your object to a layout, and clone it there. All the behaviors and properties will port over to the new object type and you can edit them. If you don't want them in your game layout you can do it in an asset dump layout that isn't connected to an event sheet.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • We just came to the same solution at the same time!

    I decided to just create a new object type altogether and wasn't able to edit it until I created an instance in the layout. So, same story there. I was coming to share the news when I saw your new post.

    The asset dump layout is a smart solution to this strange requirement that I hadn't thought of yet, so you've now saved me more thought and perhaps from having to ask another question.

    Many thanks!

  • You're welcome. I'm glad you got it all sorted.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
New Android Export Experiences
494 67,272
jabk's avatar
jabk
Unread hot topic
410 84,608
MrMegawatts's avatar
MrMegawatts
Unread hot topic
392 34,822
Joannesalfa's avatar
Joannesalfa