How do I reset a game ?

Just started using Construct 2? Post your questions here

Post » Fri Mar 07, 2014 9:47 pm

Hi again ! Good question, didn't find out with the manual as well ...

So, I just want to make a proper reset of the game, after a game over !

So I use "restart layout", "reset global variables" ... I did find out that I had to clear all arrays as well ...

My last problem are object with persist behavior : they don't come back !

Is there a way to reset the full game, other than refresh browser with F5 ?

Thanks a lot.
B
8
S
4
Posts: 131
Reputation: 1,205

Post » Fri Mar 07, 2014 10:33 pm

What type of game is it? I usually just have a main menu screen that resets everything. Objects with persist behaviour should return but probably in their original locations or is that not what you want?
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796

Post » Sat Mar 08, 2014 10:24 am

That's an Action/RPG

Player can change layout by going to a shop, or even die, the world persists, which works fine.

But when I try to set up a proper reset (other than F5), I can't find any way to make persist to object come back...
B
8
S
4
Posts: 131
Reputation: 1,205

Post » Sat Mar 08, 2014 10:59 am

I am assuming the persist objects you refer to are just in each layout by default and they get destroyed?
You can create any object using the system events so on the reset command you would just create everything again.
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796

Post » Sat Mar 08, 2014 11:34 am

use command system create at start of game once game is reset system will recreate it
B
257
S
42
G
15
Posts: 1,992
Reputation: 41,435

Post » Tue Mar 11, 2014 9:26 pm

I believe I am struggling with something quite similar.

I'm creating a game constisting of several layouts, and within each layout there are several objects with Persist behaviour (when one of these objects is destroyed, say an enemy, it will be gone when the layout is reset). This all works fine, but when the game is completed, I want the player to be able to restart the game, and then every object should be where I put them in the editor. But using Persist, they are not reset. Maybe I'm not fully understanding what some people mention above here about a menu that resets everyhting?
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Thu Mar 13, 2014 2:20 pm

I don't quite see how I can accomplish this by creating objects at the start of the layout using actions either (rather than placing objects out manually in the editor), because I want the objects to "persist" when each layout is restarted (say for example if the character dies, then the layout should be reset, but not the whole game).
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Thu Mar 20, 2014 3:05 pm

Maybe we should make a web link and reload the page, if possible :/

but this is strange that reset the game is so complicated to do !
B
8
S
4
Posts: 131
Reputation: 1,205

Post » Thu Mar 20, 2014 3:05 pm

What if we're exporting as an .exe ? :/
B
8
S
4
Posts: 131
Reputation: 1,205

Post » Thu Mar 20, 2014 6:02 pm

It's a actually not the worst idea I've ever heard in my life. I'll try it out, also for when running as an app.
B
14
S
3
Posts: 123
Reputation: 1,571

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests