[SUGGESTION] Inject Layout like Event Sheet

  • Maybe this is minor issue, or there is other solution,

    but let's say that you have 100 layouts, and at the end you noticed

    that you have to move object X from X1, Y1 to X2, Y2 on all layouts

    now you have to do all by hand

    but it would be nice to have possibility to inject objects (for example with HUD) from one layout to other layouts

  • Generally for anything that is across all layouts, like a HUD, you event their positions in instead of manually placing them.

    For example: at start of layout: create healthbar on layer "hud", viewportleft("hud"), viewporttop("hud")+25. Then just make sure that is in an event sheet common to all layouts and you're golden.

    One thing that can get really bad though is needing to alter a layer's name!

  • Tobye

    thanks!!! :)

  • Tobye

    One way to access layers is to setup a list of constant variables that match the index numbers of the layer...

    LYR_MAINMENU = 4

    LYR_HUD = 3

    LYR_FOREGROUND = 2

    LYR_PLAYER = 1

    LYR_BACKDROP = 0

    System -> Set Layer LYR_MAINMENU Visible

    If I delete/add/rename/shift layers I only have to update the constant var list to match and everything still works etc...

    Hope that helps

  • arontwose - Yeah that's a good idea! Thanks. Also though, adding layers to all layouts can be a pain, so I usually always have at least 2 spare layers. It'd be nice to have an 'add layer to all layouts' option.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • but it would be nice to have possibility to inject objects (for example with HUD) from one layout to other layouts

    This can be accomplished with global objects. Makes it very convienent and easy to work with. Specifically if you're looking to create a consistant "HUD" or "GUI" A great tutorial by GeometriX exists. You can Find it here.

    Building a global user interface (UI)

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