How do I Put a Layout Inside Another Layout

0 favourites
  • 10 posts
From the Asset Store
94 Inside buildings views - Isometric view - PNG transparent - 2048x2048
  • I don't know if this is possible, but I'm wondering if someone has achieved drawing one layout inside another. The reason I want to do this is so that I can design a pause/inventory menu for my game that I can just link back to without creating a new layer in every layout or switching layouts

    It wouldn't be a terrible alternative to have to switch layouts for this, but it'd be a lot easier just to be able to replace a layer in each game map layout with the pause menu layout.

    If anyone can help with this, that'd be awesome! Thank you!

  • You can't run layouts within layouts, but check out global layers for HUDs etc.

  • Thanks a lot! I'll look into that!

  • Not really what I was looking for, but maybe the only option? I think there should be a way to include layouts within layouts though..

  • It's impossible for layouts to be within layouts, or for them to be inter-connected in anyway, e.g. multi-layout editor, in Construct 2.

    If you look back enough there's several threads I and other people made asking for Multi-layout editors and such but Ashley said it's impossible with the current architecture of the engine.

    it's possible in Construct 3 since we'll be getting an editor SDK, but even then it's up to some genius to make it possible and not Ashley.

    Your best bet is to make a save state of the game when switching to the pause menu and just loading the state when you exit the menu.

    Rather than using save states I'll use an array to store the progress of the game, because save states won't do what I need it to.

    So two layers can't run side by side... It seems like it'd be an easy task. Set up a layer that connects to a layout in the GUI and make the script that'd run the other layout run at the same time the layout you're actually on runs. The GUI would tell the engine to include the objects from one layout in the other, so you could include the event sheet that the other layout uses within the event sheet of the one you're actually on.

    I'd have to take a look at Construct 3 later to see how that'd work though.

    I also had the idea of just throwing all the objects I need for the menu in a folder and when I create a layout that uses the menu, create an event sheet that controls the object's positioning and then make them invisible when the menu isn't open, but that might become pointless.

    I'll just go with your suggestion...

  • For an inventory, I make another background over my layout and change it to visible when button is pressed. Then I put everything I need on the background switching between invisible/visible. This may not be the most efficient way, but it works for me. Though I haven't yet figured out how to pause my game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think is possible. If you don't want a layer, you could create your inventory panel + all elements in a container when you need them and destroy after that. Use a container/family maybe , or create and position each individually

  • Meh, this was a rookie question. I use one layout for every level in my game. I think I asked this question because I wanted split-screen players to be in different levels at once, allowing them to team up or play independently at will.

    To achieve this, I created a system that loads two levels into the layout, splitting the layout halfway, so one half is for one player and the other half is for the other player. The levels load into those areas. It works well, besides, I'm also making a full editor so that iterating on the game will take an incredibly short amount of time, at least from a development standpoint.

    I didn't want to do this originally, because two years ago I wasn't actually able to. So, I guess it all comes down to: If you want a feature that isn't really natively possible (at least not easily) in Construct 2, build your own engine inside of Construct 2. The editor I'm making has a cutscene/dialogue editor with branching paths, as well as a tilemap/terrain sculpting/plotting interface, and visual scripting. I'm using Construct 2 to "build the bones", so to speak, but when it's complete, it will likely feel more like an independent engine.

    Also, if you're wondering about performance, it's not an issue. I've created a lot of different methods to optimize processing and memory use that I will likely make tutorials over when my game is complete. As well as tuts for everything else.

  • That sounds great ! Could we have a capx ?

  • That sounds great ! Could we have a capx ?

    Yeah dawg, it's open source, just keep up on the Arcade page: https://www.scirra.com/arcade/fighting-games/byte-sized-heroes-prealpha-12754

    I'll be uploading the most recent CAPX soon, I've been working loads of overtime so haven't got around to getting everything done.

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