Persistent Layouts

This forum is currently in read-only mode.
  • It would be nice if Construct had a feature that you could check in the layout for "persistence". This would be similar to what GameMaker does. So if you had an RPG where you need to revisit a layout you could just do that and not have to worry about losing the state of the layout.

    I realize that you could create persistence by using events (and I've done it), but it takes a fair bit of work to save the location of all of the sprites on the layout. This seems like something that should be done by Construct since it would be required in any game where you have to revisit layouts. Of course, it would probably have to be done in a 1.x release.

  • global objects?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lucid Yes, global objects work. However, there is something buggy even then because I have had a global object at lets say 1000,1000 enter a layout and when returning end up at 0,0. Guess I should submit a bug report.

    Even assuming you are using global objects, you still have to keep track yourself in each layout whether you have entered the layout for the first time or subsequent times. As I mentioned before, this can be done with events (check a global variable or enable/disable groups), but this seems like something that would be better built into Construct.

  • It's actually easier than it seems via events. All you need to do is put all the sprites you want to save the position of in a family, then on end of layout, for each object in the family, use loopindex to write the object name in one column of an array, the x position in another, etc.

    At start of layout, run through the column of object names and create from that. It all could probably be done with 2-3 events.

  • Arima Good idea. The more I think about this its probably better suited to be implemented by the game developer than built in. Probably not worth adding into the IDE.

  • It's a nice idea though and a common question - maybe some feature could be developed to make it easier, at least.

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