How do I restart a layout ignoring persist??

Get help using Construct 2

Post » Tue Jul 29, 2014 6:47 pm

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!
B
6
S
1
Posts: 12
Reputation: 449

Post » Tue Jul 29, 2014 11:02 pm

Zacharianinja wrote: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.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543


Return to How do I....?

Who is online

Users browsing this forum: richardfu and 33 guests