Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: AndersM on Sat 23/12/2006 19:49:57

Title: 'Ask first' on Restart Game
Post by: AndersM on Sat 23/12/2006 19:49:57
Hi there. I want to have an 'Ask First' popup when I press the restart game button.
The script so far looks like this:

if (IsKeyPressed(361) == 1) RestartGame();

I want it to be somelike the quit game option;

Ã,  if (IsKeyPressed(27) == 1) QuitGame(1);

but putting an 1 in the RestartGame () only returnas a 'wrong number of parameters'. I can't find the script part that controlls the 'ask first' for the QuitGame, so I can't see how it's constructed and therefore not copy it to the Restartgame feature..Ã,  Help?

Masse

Title: Re: 'Ask first' on Restart Game
Post by: Rui 'Trovatore' Pires on Sat 23/12/2006 20:37:13
Well, that'd probably be because RestartGame doesn't support that kind of "ask first" - therefore, it's not on the manual because it doesn't exist. Which makes sense. You'll have to make a custom Yes/No GUI to call up whenever key361 is pressed, or use SSH's Yes/No module (I think. I may be imagining things).
Title: Re: 'Ask first' on Restart Game
Post by: SSH on Sat 23/12/2006 22:20:14
DialogBox module, you mean:

http://ssh.me.uk/moddoc/DialogBox
Title: Re: 'Ask first' on Restart Game
Post by: Rui 'Trovatore' Pires on Sat 23/12/2006 22:35:43
Whatever your crazy cybernetically-enhanced brain has decided to name it.