How do I change layout without resetting the last one?

0 favourites
  • 5 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Trying to set up a shop in the game, or a room inside a building. How do i go on about it to keep the main layout level still running as it is when i enter another layout? For now it seems that it just resets the game.

    https : // dl.dropboxusercontent.com/u/73502848/house.capx (remove the spaces)

  • Well, you can use the Persist behavior to make individual objects remember their state when you return to layout. If it's something more intricate you may have to set up a save system with LocalStorage or something to make it save/load data.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So the Persist behaviour would be good on a few objects but not the whole level? Lets say my guy has shot a dozen enemies dead on the ground and a handful are still behind a wall or something and lets say another house is in flames, i have to go to the shop to re-arm since im out of firepower. how do i get the level to be in the same state as when i entered the shop after i come out all gun-ho again?

  • Persist does in fact remember the attributes of objects like their positions and animations, whether they're destroyed or not, their instance variables, etc.

    To use it just add the Persist behavior to any object that you'd like the game to keep track of, so e.g. monsters and powerups would need it, but a static background that never changes would not.

  • Sweet, seems to work A bit smarter again, thanks!

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