Well, that sort of worked. Now, I'm getting the character's actual name instead of a blank line. I was hoping, though, that I would be able to make it so it would make it so you can't push the "ok" button until there is at least 1 letter in it.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu InputBox("Hello, what's your name?",plrname);
StrCopy(character[EGO].name,plrname);
Display("Well, nice to meet you %s",character[EGO].plrname);
if (interface == OPTIONS) {
if (button == 5) SetGameSpeed(GetSliderValue(2,5));
if (button == 13) SetMusicMasterVolume(GetSliderValue(2,13));
if (button == 10) SetSpeechVolume(GetSliderValue(2,10));
if (button == 4) SetSoundVolume(GetSliderValue(2,4));
if (button == 0) SaveGameDialog();
if (button == 1) RestoreGameDialog();
if (button == 2) RestartGame();
if (button == 3) QuitGame(1);
if (button == 8) Display("Game by Knights Creations with use of AGS. AGS copyright of Chris Jones.");
if (button == 9) {
GUIOn(1);
GUIOff(2);
}
if (button == 3) DisplaySpeech(EGO, "Art thou shure thou wishes to quit?"; {
GUIOn(5);
GUIOff(2);
}
}
Quote from: strazer on Mon 18/04/2005 04:30:20QuoteActually, I figured out what all was wrong.
Care to tell us what was wrong?
As for the quit screen, in addition to the GUI a control was clicked on, you also have to check which control it was, hence your interface_click function should look something like this:Code: ags function interface_click(int interface, int control) { if (interface == YOURGUI) { // if any control on that GUI was clicked if (control == 2) { // if control no. 2 was clicked (quit button) QuitGame(0); // quit game without asking } } }
Note I have used "control" as the variable name instead of the default "button" since I like that term better.
And please, if you have basic questions such as this that are not directly related to the subject of the thread, please open a new thread in the Beginner's Forum instead of posting to the sticky threads. Thanks.
Quote from: strazer on Mon 18/04/2005 04:21:04Thanks, man, that helped. I guess I forgot to look in the manual for that. Thanks for the help.
Manual: Tutorial -> Setting up the game -> Inventory -> 3rd to last paragraph.
(INVSHR) should do the trick.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.044 seconds with 15 queries.