Is it possible to use dynamic layer and include objects pre-created in it?

0 favourites
  • 9 posts
From the Asset Store
Background Story generation templates. See the Arcade demo.
  • So, at first, when I read about this new feature I thought I could add any layer that were pre-created in the editor and would be able to instantiate all objects that were included in that layer, automatically.

    Turns out for my surprise this isn't the case. It just creates an empty new layer and that's it.

    I think the new dynamic layer feature would be more powerful if it instantiated the objects included in that layer.

    Am I using it wrong or did I misunderstand the real purpose of dynamic layers?

  • I think the idea was to allow for things like dialog and inventory type layers, so they can appear (set all the other layers on non-click recieve) and then depart when they are done. This way if you are writing a menu system as a stand alone you don't need to know what the programmer has called the layers (or how many there are) in their particular app. If you have layouts with various layers you also want your dialog box not to have to see how it fits on a layout--it just generates its own layers.

    yours

    winkr7

  • The Recreate initial objects action nearly handles the instantiating pre-created objects part of it for you already - the only bit missing is to then move all the created objects to the new dynamic layer, which you might be able to do with an extra "move to layer" action.

  • Ah I see! That's interesting, although not perfect it's a nice workaround and solved my problem.

    It would be nice though if we had a similar functionality in the Add layer dialog box.

    Thank you Ashley!

  • Owwww... I must say I also thought this could be a great feature but it's not what I thought.

    When I dynamically add a "HUD" layer to a layout, which is a global layer I created and designed in another layout, I was honestly expecting it would create the global layer with everything I designed.

    I thought this was meant to be a solution to avoid many unnecessary layers through out every layout on the project.

    Is this something we can expect in future updates?

    I was the one suggesting this idea in the ideas platform and it was "closed" and I can't see it anymore, but, sorry to say, it's not what we find useful.

    I can give many examples but please let me know if it's something doable.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just fell for the same thing... It seems dynamically created global layers don't create the objects on that layer?

    I can get it to work using the method mentioned above — for example:

    But it's a labour to have to manually recreate every single object with events (and keeping those events reflective of any future design changes to that layer).

    Unless I'm doing it wrong? Otherwise I'm not sure what the point of dynamically creating a global layer is, if not to bring the objects with it? (like how the editor does it, when you add a global layer to a layout)

    AVIX If you end up recreating another suggestion for this, please link it here!

  • I just fell for the same thing... It seems dynamically created global layers don't create the objects on that layer?

    I haven't tinkered with this feature yet but this is what I kinda hoped/expected actually. That I can basically create a Layout that holds something like menus in global layers, and then I can spawn in the layer whenever needed and remove it ezpz when I'm done menuing.

    Good to see that recreate initial objects action does that, but I think it would be perfect if we could get a single action that just recreates all instances of all objects for global layers. Something like "recreate global layer"

  • The current implementation of global layers is done entirely in the editor. It basically is a shortcut to copy and paste the content of one layer over multiple other layers. This means at runtime the concept of global layers does not currently exist, and so in its current form it's not really possible to implement a runtime form of global layers.

  • Thanks very much for the clarification!

    The current setup does create a strange user experience: "layers" means something very different in the editor vs at runtime, but I'm not sure C3 users would ever think about it that way.

    Certainly for global layers, there's (currently) no reason to think that creating it dynamically would just be an empty layer with the same name. Up until runtime, using the name of a global layer overrides an empty layer and forces its objects into existence (which i think is the cause of the above expectation/confusion)

    But if that's the intent so far, it sounds like a feature suggestion should be made?

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