Global Layers duplicate Global Objects

0 favourites
  • 10 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.
  • Problem Description

    A global layer duplicated global objects.

    Attach a Capx

    https://onedrive.live.com/redir?resid=7 ... ile%2ccapx

    Description of Capx

    global layer and global objects.

    Steps to Reproduce Bug

    • press key to goto next layer, view debugger to see duplicates.

    Observed Result

    Objects get duplicated.

    Expected Result

    Global layers should only duplicate the PROPERTIES where the global setting is listed under. global layers SHOULD NOT duplicate global objects, because we should only set objects to be global if we want them to be(hence the option within each object)!

    Affected Browsers

    • Chrome: (YES/NO)
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Operating System and Service Pack

    vista

    Construct 2 Version ID

    r227

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You'll probably say, it is by design. Well this is poorly designed. I want global layer properties- not global objects. If I want global objects, I use the global option in the object itself & not the layer properties.

    edit: sorry if I sound like an ass- just was a bit frustrated.

  • I tried to get rid of the global objects and use just a global layer, but it causes z-index issues, and position issues.

    I understand that it could be useful to have global layers recreate all the objects, etc.. but I think there ought to be a way to exclude global objects from being recreated, as well as exclude all objects from being recreated(if you just want to make the layer properties,etc carry over).

    I've, had to go through in a text editor and modify all my layouts. I copied layers from one to all my others in a text-editor because it is quicker, since I can't seem to use global layers.

  • Wow, that's crazy. Thanks for pointing this out. I had fifty copies of my HUD objects after one minute of changing rooms.

    Confirming this bug on r229 64bit windows 7.

    Hopefully this gets solved soon

  • Sorry, but... this is by design. The purpose of global layers is to be the same as if you copy-pasted all the instances on the layer to every other layer it represents. (This is what you were forced to do for things like HUD layers before this feature was added.) The process ignores the properties of the object. If you have global instances on that layer they will be re-created because that's what would have happened if you copy-pasted them to the other layers too. I'm not sure why you would make the objects on a global layer also global though - you don't need the layer to be global if you want the objects to continue existing between layouts. So it seems like you want one or the other, but not both.

    Also we can't just shrug and change things like this, because it could break existing projects which rely on the existing behavior.

  • Ashley, there should be a way to carry-over the layer properties without the objects. This is the point I'm making.

  • Why would you want to copy the properties but not the instances? It sounds like you either want to make the layer not global, or leave it global and make the objects on it not global.

  • Ashley, If the layer has a set background color, parallax, opacity, effects, etc.. I want to carry-over those settings to any other layer with the same name. At the moment that isn't possible without it also duplicating the objects on the layer.

    My point is that you should give users the option of whether they want one or the other carried over, or both. Don't force it on the user.

    Instead of just a global setting. Let Layers have a Global Layer Properties Setting, Global Layer Objects Setting, Global Layer Effects Setting.

  • I still don't understand why you would want to do that? The main use case for global layers is to avoid the "copy-paste instances in every layout" problem, what are you trying to do that needs that set of features? Also why can't you just create the global objects on a different layout and then have no instances on your global layer?

  • Ashley ,

    I'll try to explain how I am using things:

    I have a layer named "gui" on my first layout (and every other layout).

    This layer holds all my menu/gui stuff, which is basically a bunch of spritefonts.

    The spritefonts are part of a family and have a lot of instance variables.

    The spritefonts are also global objects, because I need all the variables to remain set accordingly.

    Due to the spritefonts being global variables, I cannot set the layer to be global, otherwise if I do then I would get duplicated spritefonts.

    I want to have the "gui" layer properties carryover to any other "gui" layer in the project, because I have the parallax set to 0,0 on it.

    Due to this, It makes it time-consuming to adjust all the "gui" layers on every layout if I need to change a property. If I have 100 layouts with "gui" layer. It would just take one change to set all their properties if I could make the layer properties global without it creating/duplicating the instances.

    The spritefonts have to be global to keep their variables set appropriately, so I can't use global layers as it is currently implemented.

    If instead, there were the options to Let Layers have a Global Layer Properties Setting, Global Layer Objects Setting, Global Layer Effects Setting, then it would improve the workflow. I would be able to use global objects, and have the layer properties carryover

    Hope that helps you understand the issue here.

    edit: or maybe just have it check if object is global, and not recreate any global objects. That might suffice?

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