Is there a way to reset the game on death?

Currently making a text based adventure where if you make a stupid decision, you die. The thing is, there is no function to reset the game (for some reason)... There's an option to 'finish' the game, but that still means you have to refresh the page every time you die. Is there really no better way to just respawn or restart the game without me going through coding gymnastics? I mean come on, that should be a basic feature!

This will be a feature of the next version of Quest, as described here:

We are having difficulties (outside my control) getting the web version uploaded, so not sure when it will be live; I am hoping very soon....

Otherwise... Don't use finish.

I would suggest creating a new function called Finish, and have that move the player to a room not connected to anything else, where the room description is "You are dead" or whatever (and loses all objects in her inventory too). You could turn off the side panes too perhaps. The player can then type "undo" at the command bar.

you're creating the game, so there's no 'reset game' catch all for everyone/anyone, as each game created is different. Well, I guess you can capture the entire game code before the game begins, and 're-load' that entire game code (the game code before the game begins), but then, that's not really any different than simply clicking on the 'restart game' at the menu bar at the top, lol, and likely that's how the 'reload game' in the menu bar at the top works already.

now, if you want to be able to specifically restart the game keeping lets say your level and stats and etc, but not any items collected, and all quests are reset as well and with any of their quest/event items. Well, that means you got to code that in yourself, because someone else might want some different stuff being preserved or not preserved, for their game.

This topic is now closed. Topics are closed after 60 days of inactivity.