How do I reset a game ?

0 favourites
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • 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.

  • 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?

  • 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...

  • 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.

  • use command system create at start of game once game is reset system will recreate it

  • 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?

  • 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).

  • 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 !

  • What if we're exporting as an .exe ? :/

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey, not to but in on the tread but did you guys ever figure this thing out?

  • Hey, not to but in on the tread but did you guys ever figure this thing out?

    Well, as for me, I think reloading the page is a pretty decent way of doing it. The game will restart with all variables restored to default, but it will of course restart to the splash screen, so it might not be the best way for everyone.

    I'm sure there is a better (and probably more complicated) solution, but I haven't really spent much time exploring other options yet.

  • Actually you "just" need to find all the things that could be created/changed during the game and reset them to default.

    Commands like "reset all global variables" will help you. Or you just reload the layout.

  • It sounds easy enough, but I ran into some trouble when I wanted certain object to have the Persist behaviour, so as to for example stay dead if the player have killed them when restarting layout. So in order to reset these when the player wants to restart the game from the beginning, the easiest way for me was to use "reload page" action.

  • Actually I think you have to use "reset global variables"

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