Switch between layouts

0 favourites
  • 7 posts
From the Asset Store
Toggles Dials Switches and Alerts ! A foundational sound grouping of Analog type switches and Steampunk effects
  • I`m making an RPG game where the main game field and character statistics are on the different layouts (well, i thought it`s possible). But now i faced the problem: switching to stats layout and back sets my main layout to the default state. And that`s a drama for me.

    So, the question is: what am i doing wrong? How to switch between layouts without losing it`s vurrent state? Or, if it`s impossible, how can i solve this problem?

  • 1.- You can use a GUI layer that hides/unhides, no need to switch layouts

    2.- Are you storing stuff in global variables?

  • 1 - i`m afraid gui layer will make hard lags when switching (but im not sure and i can`t check because project is on the designing stage)

    2 - some in the global variables, some in dictionary

  • Oh, i`m so happy, look at the today`s update:

    Second, the new Persist behavior allows you to make persistent layouts. Normally if you leave a layout then return to it, all its objects have reverted to the initial state as you designed in the editor. Sometimes this is annoying if you want, say, the player to return to a previous level but with all the enemies they killed and powerups they collected still gone. Now you can simply add the Persist behavior to objects you'd like to remember - in this case, the enemies and powerups. Then on returning to the layout, all those objects are exactly as you left them.

    Yay!

  • I was going to say, if there're less than ~10 layouts total to switch and your game screen isn't large, it shouldn't be a problem to squeeze them all into one layer. But that Persistent Layout is still many sorts of useful.

  • yozzik Check today's update

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • California the last post done by Yozzik talked about the update with the persist option :)

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