Quest 5.8.0beta has a RESTART command. So, now we can do things like this:
<function name="FinishGame" parameters="message"><![CDATA[
message = "<h3>GAME OVER</h3>" + message
ShowGameOverMenu (message)
]]></function>
<function name="ShowGameOverMenu" parameters="message"><![CDATA[
ShowMenu (message + "<br/>What would you like to do?", Split("UNDO your last command;RESTART from the beginning;QUIT the game", ";"), false) {
switch (result) {
case ("UNDO your last command") {
invoke (undo.script)
}
case ("RESTART from the beginning") {
JS.RestartGame ()
}
case ("QUIT the game") {
finish
}
default {
ShowGameOverMenu
}
}
}
]]></function>
That is cool K.V.!!
(Also, note to self: Never get in a fight with K.V.... he seems to be throwing a mean a$$ punch!)I find it ironic that I spent a while to code this into my game not to long ago, though with a few caveats for the specific games needs.