I've searched the threads and checked the manual. . .does anyone know how to make the game ask before you restart, like it does with the QuitGame(1) option? I saw in the manual something about ASK_FIRST but I'll be danged if I can find it written anywhere in the game's script. Should I just make a brand new GUI window with QUIT and RESTART functions in two buttons, or is there some other script-y way to make it automatically ask "Do you want to restart?" just like with the Quit button? I just don't want anyone to accidentally get restarted without having saved their game, and boycotting my game forever. ;D Thanks!
First of all: Making sure the user really wants to restart before doing so, is a very wise decision, that I missed in a lot of AGS games. ;D
As far as I know, there is no "pre-made" GUI like the "Do you really want to quit?" one.
So you'd have to create your own one, put in a label which says something like "Do you really want to restart?" and add two buttons (one for "Yes" and one for "No" of course). Then you add GUI scripts, that this GUI pops up when the user clicks on the "Restart" button in the main menu and you only restart when the user then clicks on "Yes". If he chooses "No", the GUI will disappear again.
Phew, I am tired, sorry for the crappy explanation, but this should be done quite quickly and it gives you the possibility to change the appearance of the GUI.
And while you're at it, make that your global "question" gui and just set the label and button texts and use the return value for all your dialogs.
I figured it'd be something like that. . .I'll just make my own GUI.Ã, I was using F9 while I was testing one-time animations in the game, and it occurred to me that someone might hit it by accident. :)Ã, Thanks, guys.
(secretly pretending he knows what a global "question" gui is) :-\