Ending the Story (Quest 5.8.0 beta)
K.V.
10 May 2018, 02:35Quest 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>
CheeseMyBaby
10 May 2018, 07:51That 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!)SoonGames
10 May 2018, 23:32Nice idea.
Talon
16 May 2018, 14:57I 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.
K.V.
16 May 2018, 15:36The RESTART command and RestartGame()
JS function were recently added to Quest 5.8. Before that, you had to press CTRL+R or use the menu option to do it in the desktop player.
K.V.
21 May 2018, 03:54Thanks for the kind words, everyone!
Never get in a fight with K.V.... he seems to be throwing a mean a$$ punch!
I'm strongs to the finish, 'cause I eats me spinach, Cheese!
JenniferCampbell
21 May 2018, 12:22I would gladly pay you Tuesday, for a CYOA, today!
K.V.
21 May 2018, 12:35I would gladly pay you Tuesday, for a CYOA, today!
Ha!
Wimpy RULES!!!