How do I reuse a composition of elements?

0 favourites
  • 3 posts
From the Asset Store
🙌 Element Magic Hit Sound Pack comes with 805 high-quality sound effect
  • Hello,

    I have a question on approaches or how to structure and reuse a composition of elements. What I mean, for my example now. I want to use a little "Help Window", where I describe certain aspects of my game composed from different texts and sprites. This "Help Window" could be called from my Menu Layout and my Game Layout. Right now I have a layer in both Layouts that I turn on and off. But I had to compose this layer twice.

    So my question is, ist there a smart way to not do it twice. Are Containers usally used as an advanced Construct 3 user? Or how do you structe elements that should be used as one object again and again.

    Thanks in advance :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can set the layer as Global, then all objects from it will appear on all layouts where you add a layer with this name.

    Another option is to use hierarchies. Select all objects of the help window, right-click on the parent object (for example WindowBackground sprite) and add all other objects to the hierarchy. Then you will be able to create the entire hierarchy in runtime - WindowBackground will be created with all its children. This way you can store the whole help window on an unused layout and only spawn it when needed.

    I actually have a separate layout "DialogueAssets" in my project with dozens of hierarchies for different menus, dialogue and popup windows etc.

  • Ah thanks, while global layer works, I prefer the hierarchy solution. The "cleaness" I was looking for ^^

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