I want to add something to my game that prompts the player to save when the quit button is pressed, something like "Do you want to save your game?" and relevant buttons (yes/no) If they say yes, they're taken to the save screen, then when they've saved, the game quits, if no the game quits immediately. I've tried a few times on my own but no luck. Can someone please tell me the script I need and whereabouts it should go?
Thanks! :)
JudasFm
Create new gui. Name it PROMPTUSER
make it popup modal and set all buttons to run script
Add label Make it say "Do you first want to save game?"
Make 2 buttons "yes""no"
For yes button type:
SaveGameDialog ();
QuitGame (0);
}
For No button type:
QuitGame (1);
Hope this helps.
P.S. I'm assuming you know how to make a basic gui.
::Zor
Thanks...I think that kind of worked. I've got the script in place for the buttons but I still can't get the GUI to appear whenever the player clicks on Quit ???
Set teh quit button to:
GUIOff(GUI); // if any needed
GUIOn(QUIT); // if the quit QUI is called "QUIT"
SetCursorMode(6): // set to the arrow pointer
Wait(1); // so that the screen gets to update
Oh boy, it REALLY didn't like that one ??? Thanks anyway though; I think I'll have to go back to the drawing board (ie, a warning in the manual ;))
What do you mean it didn't like it?
I mean it kept giving me error messages about the script when I tried saving it *is puzzled* Oh well...it's not too important; it's probably something I missed in the script/GUI. Thanks for your help though; I'll keep playing around with it :)
TK,
SetCursorMode(6);
;)
Ooops... sorry... that happens to me all the time...