Hidden feature #9: Inherited Layers

This forum is currently in read-only mode.
From the Asset Store
Make your game more fun and interactive with the Dog Hide and Seek Buttons Sprite Sheet.
  • I just found them and I have to say they are awesome. They are great for huds and other things that are on every layout but may change later in the game making process.

    Here is how they work. First make a new layout and name the layer something unique (for my example well use "InheritedHUD") then go to your games layout Click on the layer that You want to be your hud and go over to its properties and it says "Inherited Layer" Type in "InheritedHUD" and hit enter. The layer that you made on the other layout should be shown in your hud layer. So if you have a game across multiple layouts and want to make a change to the HUD it will be put through to all the layers it is inherited on Automatically. So you can inherit the HUD on all layouts and it will change Automatically.

  • Indeed, I've utilised them before for a HUD, very useful for when you're fiddling constantly with an interface.

  • awesome!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I didn't understand all of that... will try it now.

    This should go in the wiki though

  • agreed. and at the time of your posting, it already is :)

  • Is there any specific settings, or tick boxes or anything like that that would cause this not to work?

    I've set it up as you have said, but it doesn't show up at runtime, and if i deselect the layout, and then return to the properties, my inherited layers box is empty!

  • Weow! This is pretty fucking awesome.

    So this literally means that you only have to create one layer in your first Layout that has the UI in it and then you just create a layer on top of every other layout which inherits the UI layer from the first layout. No copying instances around or shit, it just works.

    Nice one!

  • well, if the objects on the original layer are influenced by events from their respective layout's event sheet, you'd have to include that event sheet in the inheriting layer's layout, too. but that is still rather comfortable :)

  • I eventually figured it out...but my layout editor started crashing continuously shortly after getting it working, clicking on anything, right clicking, moving the layout around, every layout would crash within 3 clicks. It still ran perfectly when executed though. As soon as i deleted the layout i was inheriting from construct stopped crashing.

  • A crash was fixed where if you didn't open the layout where the inherited layer was before others, it'd crash/infinite loop.

  • Is that in the 0.99 version? Either way, an easy work around I'm going to use(At least for now) is to have it set up in the starting Layout, and we will see how it goes from there.

    As a sort of spin off related idea, how about a section in the Wiki that relates to current bugs, or technicalities such as this, or layout fades not working with blur, etc? Just to save some of the questions like this.

  • It's fixed in 0.99 yes.

    I'd think that page would get a little hard to maintain; it's possibly easier to check the bug tracker (which can be searched) to see if an issue is known about.

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