How do I restart a layout ignoring persist??

0 favourites
  • 2 posts
  • I hit a bit of a snag on the game I have been working on lately. I need to reset the layout every so often to completely reset it but at other times I need the persist behavior in order to move out of the layout and back in.

    The gameplay is like this; the world is randomly generated to look like a rogue-like where you move around and what not; but every so often you will get into a turn based battle it moves the player into another layout in order to take care of the whole battle sequence. So when you finish that, you should be able to go back and the world that was generated would be the same as it was. So for this I used the persist behavior. But then when you beat the level I need to reset the layout again in order to generate another level to move through. But some objects having persist here makes it pretty messed up.

    Does anyone have any idea how I should tackle this?

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I hit a bit of a snag on the game I have been working on lately. I need to reset the layout every so often to completely reset it but at other times I need the persist behavior in order to move out of the layout and back in.

    The gameplay is like this; the world is randomly generated to look like a rogue-like where you move around and what not; but every so often you will get into a turn based battle it moves the player into another layout in order to take care of the whole battle sequence. So when you finish that, you should be able to go back and the world that was generated would be the same as it was. So for this I used the persist behavior. But then when you beat the level I need to reset the layout again in order to generate another level to move through. But some objects having persist here makes it pretty messed up.

    Does anyone have any idea how I should tackle this?

    Thanks in advance!

    If your game is not for mobile devices, you can use browser>reload, but this will restart everything, not only the layout. This is not working on cocoonjs, don't know about crosswalk or ejecta.

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