How do I add global layers with the add layer event?

0 favourites
  • 5 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • In a game I'm working on I am trying to add a layer when the player completes the level that shows the victory and the next level button and stuff. I thought that if I named it the same name as a global layer I already haver set up in the project that it would become that layer, but it just becomres its own layer. Do you think there is any way to add global layers this way? Obviously I can just include the layer from the start and set its visiblity and whatnot, but I thought it might be interesting to try it this way. What do you guys think?

  • Which add layer event?

  • ThresholdGames It's probably not supported, because Construct will have to create all objects on the global layer.

    lionz C3 supports dynamic layers now, you can add/remove/move them in runtime.

  • Global layers are currently implemented as an editor feature - by the time it launches the runtime, all overridden layers are replaced with normal layers that copy the global layer. So it's not currently possible to add a global or overridden layer at runtime.

    Since your project likely has a fixed number of global layers, you probably don't need dynamic layers anyway - just add the global/overridden layers in the editor and make them invisible if you don't need them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Would be nice to have support for global layers for the dynamic layers feature.

    This way we could design our menus in a separate layout, without ever having to worry about including a layer with the same name in each layout. If there are tens or hundreds of layouts, it can be quite a chore.

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