Menu

Show posts

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

Messages - Edwin Xie

#101
Hints & Tips / Re: 10 Minutes help
Sun 24/10/2004 06:17:45
Thanks, I finished the game! ;D Ok.....now I get to generate a walkthrough:
WALKTHROUGH:

Interact with car.
Open the glove box at the right.
Try to make out three objects in the glove box and interact with them.
Press 'EXIT' found at the very right.
Interact with your wallet found in your inventory (if you can't see it, look harder).
Walk to the very right.
Use your wallet on the tramp's head.
Ask about your daughter.
Tell him that he is arrested.
Ask him if he knows the terrorist's name.
Interact with the door labeled '6' on the top.
On the front wall, there is a little gray bell next to a door.
Interact with it.
Use your wallet on the person inside known as "the caretaker".
Ask about Hassem.
Walk out the room.
Walk back in the room.
You discover he is in the league of the terrorists.
Use your gun on him.
Now talk to him.
Use your handcuffs on him.
Get the 'stick' at the right. (It's actually a broken broomstick.)
Now walk out the room again.
Press the red button near the lift found at the left wall.
Walk in the lift.
There is a circle at the top. (It's a manhole, by the way.)
Use your 'stick' with it.
Use your 'stick' with it again.
Now interact with the brown spot in the circle.
Wait.
Walk through the opening at the right.
Walk to the end of the second manhole so that the terrorist guarding the 7th floor comes.
You have to hurry.
Use the 'walk' cursor on the black part of the first pillar (which is near the entrance of the maintainance corridor).
Wait a little.
Use your gun on the terrorist that just walk past you.
Now interact with his dead body so that you find a knife.
Walk back to the top of the lift.
Interact with the black part of the circle.
Now, walk out.
Use your gun on the first door (near the lift).
Now you have to really hurry.
Shoot the second terrorist before he makes it to the door.
Interact with him to find a piece of paper.
Go to the room the terrorist was going to.
There your find your daughter.
Ok, here is the tricky part, click on the knife in your inventory.
You see the white pixel on it?
Use the white pixel on the knife right on the tape on your daughter.
She tells your that there is a bomb in this flat.
It is in the waste basket right below the desktop.
Go back out the room.
Interact with the wastebasket.
Ok, copy the number down on a piece of paper. (Real life, I mean)
Interact with the bomb on the floor.
Ok, the buttons go in the following order (Numbers you are supposed to press are red):
1,2,3,4,5
6,7,8,9,0   A
The numbers have to go in the following order:
07462A
Watch scenes at the back.
Enjoy!
#102
How do I? I want it to be like those original debug teleport GUIs only with another background color, but I can't seem to do this. If you aren't really familiar with these, there is a label at the top saying "Enter new room: (in room (the current room number the player is in))" and at the bottom, a textbox where you enter a room number to go there, and then at the right is an "OK" button which is like pressing the 'Enter' key on the keyboard when a textbox is around and then a cancel button at the bottom of the 'OK" button. Thanks for your help.

EDIT: Sorry for not making this shown as solved, but I will right now.
#103
Those disks seem nice :o ...... just one problem, how are we ever going to have BD players? If they are going to be used on the computer, do we have to buy a computer from Hewlett-Packard and Dell?
#104
Hints & Tips / Re: 10 Minutes help
Sun 24/10/2004 01:50:14
How do I disable the bomb? The combination doesn't work!
#105
The Rumpus Room / Re: What State are YOU from?
Sun 24/10/2004 01:29:01
Quote from: Gilbot V7000a on Tue 01/06/2004 09:40:23
States? What?

* Gilbot V7000a hates that the forum is now full of regional threads that he has no fun (chance) in participating.

Uh...isn't Hong Kong a state or province? By the way, I am from California, US, North America, Earth, Solar System (Sun), Milky Way, The Universe, blah blah blah.
#106
General Discussion / Re: I made a game.
Sun 24/10/2004 00:55:52
Hmm, nice game! ;D
#107
General Discussion / Re: Creating Programs....
Sun 24/10/2004 00:21:44
Uh, I created a calculator taken from the documentary of Bloodshed Dev C++ but that didn't compile.
#108
Completed Game Announcements / Re: The Cube
Sun 24/10/2004 00:13:56
Hmm, I don't understand the symbols on the wall. A little help here?
#109
Hints & Tips / Re: 10 Minutes help
Sat 23/10/2004 23:49:36
No, I meant where to hide.
#110
I have one final question to ask, which lines do I have to modify to make it so that the player can save a limit of 100 save game slots?
#111
Beginners' Technical Questions / Re: Item Help
Sat 23/10/2004 22:39:48
Goot, VII Toast modified the title and his post. The post was originally asking about characters.
#112
General Discussion / Re: Creating Programs....
Sat 23/10/2004 21:29:38
Ok, I got to start going the library one of these days.
#113
General Discussion / Re: I made a game.
Sat 23/10/2004 20:57:00
Hey, how do I get past the splash screen? Clicking on it doesn't help. For reference, I have Windows XP Home Edition.
#114
Hints & Tips / Re: Walkthrough Links
Sat 23/10/2004 20:51:30
That's it, I think we are going to need an alternative walkthrough link made by someone other than AGA as he, apparently, is not online to hear our PMs.
#115
Hints & Tips / Re: Site dead????
Sat 23/10/2004 20:49:28
Please, look at the thread "Walkthrough Links" right above this post!
#116
Thanks. Uhoh, now I realized that when I read your post it took almost 100 seconds. With 19 queries. Maybe I was downloading that game at 10kbps when it should normally be about 4kbps.
#117
General Discussion / Re: Forum problems?
Sat 23/10/2004 20:29:51
I have 18 queries as I read yours.
#118
Hmm, I agree, especially about the links. They sometimes lead to a site that has been abandoned and sometimes goes to the wrong links. Yeah, the game showcase has to be changed, I don't want to see 5 Days a Stranger and Night of the Hermit all the time. I agree on the sortable by date of addition too, I don't want to see old games on the first page.
#119
And that is only part of it. Since I can't exceed the 20000 characters limit in these forums. I am forced to double post and here is the rest of it:
http://www.2dadventure.com/ags/edsglobalscript1.zip
sorry for the zip file, 2dadventure does not allow txt files.....
#120
Code: ags
// main global script file
#define SAVELOAD_SLOTS_MAX 20 Ã, // Ã, the max number of saved slots (*must* be 20 or less!);

// Slot name if user doesn't specify one:
#define SLD_DESCRIPTION_DEFAULT "Unnamed slot"

// Default warning messages:
#define SLD_MESSAGE_TooManyGameSlots Ã,  Ã,  Ã,  "There are too many game slots. Please, choose an already existing item to overwrite!"
#define SLD_MESSAGE_NoItemSelectedToLoad Ã,  "Please, choose an item to load!"
#define SLD_MESSAGE_NoItemSelectedToDelete "Please, choose a slot to delete!"

//--------
// Flags:
//--------

// Close the dialog GUI after saving the game (1 - yes, 0 - no):
int sld_bCloseGUIAfterSave = 0;

// Save the game on 'Enter' pressed:
int sld_bDoSaveOnEnterPressed = 1;



// Save/Load dialog GUI:
int sldGUI = -1; Ã,  Ã,  Ã,  Ã,  Ã, // Ã, saveload dialog GUI (-1 until opened);

// Save/Load dialog GUI objects:
int sldTextbox Ã,  Ã,  Ã, = -1; Ã, // Ã, saveload textbox GUI object number;
int sldListbox Ã,  Ã,  Ã, = -1; Ã, // Ã, saveload listbox GUI object number;

int sldSaveButton Ã,  = -1; Ã, // Ã, saveload save Ã,  button GUI object number;
int sldLoadButton Ã,  = -1; Ã, // Ã, saveload load Ã,  button GUI object number;
int sldDeleteButton = -1; Ã, // Ã, saveload delete button GUI object number;
int sldCancelButton = -1; Ã, // Ã, saveload cancel button GUI object number;



//-----------------------
// Functions:
//-----------------------

function PrepareSaveLoadDialog(
 Ã, int GUI, 
 Ã, int textbox, 
 Ã, int listbox, 
 Ã, int saveButton, 
 Ã, int loadButton, 
 Ã, int deleteButton, 
 Ã, int cancelButton) {
//=---------------------------------------------------------------------=
// Ã, Prepares a save/load dialog GUI (setting necessary GUI objects),
//=---------------------------------------------------------------------=

 Ã,  Ã, // Ã, if GUI wasn't specified:
 Ã,  Ã, if (GUI == -1)
 Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã, // Ã, display error message and abort the game:
 Ã,  Ã,  Ã,  Ã, Display("Error: Save/Load dialog GUI hasn't been set up!");
 Ã,  Ã,  Ã,  Ã, QuitGame(0);
 Ã,  Ã, }

 Ã,  Ã, sldGUI = GUI; Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, set saveload GUI;
 Ã,  Ã, sldTextbox Ã,  Ã,  Ã, = textbox; Ã,  Ã,  Ã,  // Ã, set saveload textbox GUI object number;
 Ã,  Ã, sldListbox Ã,  Ã,  Ã, = listbox; Ã,  Ã,  Ã,  // Ã, set saveload listbox GUI object number;

 Ã,  Ã, sldSaveButton Ã,  = saveButton; Ã,  Ã, // Ã, set saveload save Ã,  button GUI object number;
 Ã,  Ã, sldLoadButton Ã,  = loadButton; Ã,  Ã, // Ã, set saveload load Ã,  button GUI object number;
 Ã,  Ã, sldDeleteButton = deleteButton; Ã, // Ã, set saveload delete button GUI object number;
 Ã,  Ã, sldCancelButton = cancelButton; Ã, // Ã, set saveload cancel button GUI object number;
} 
 Ã,  

function on_event_SaveLoadDialogGUI(int event, int data) {
//=---------------------------------------------------------------------=
// Ã, Processes events catched through the on_event function.
// Ã, Note: it must be called from within the on_event function!
//=---------------------------------------------------------------------=

 Ã,  Ã, // We have to catch a click over a textbox here as
 Ã,  Ã, // the interface_click function isn't triggered
 Ã,  Ã, // if such an event happens!

 Ã,  Ã, // Ã, if there is click over a textbox:
 Ã,  Ã, if (event == GUI_MDOWN)
 Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã, if (data == sldGUI)
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, if (GetGUIObjectAt(mouse.x ,mouse.y) == sldTextbox)
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, remove listbox highlight (textbox has a focus now!):
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, ListBoxSetSelected(sldGUI, sldListbox, -1);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã, }

}


function UpdateSaveLoadDialogGUI() {
//=---------------------------------------------------------------------=
// Ã, Updates the saveload dialog GUI to reflect the changes being made
// Ã, and returns the total number of saved slots.
//=---------------------------------------------------------------------=

 Ã,  Ã, // Ã, store an old value (to restore it later): Ã, 
 Ã,  Ã, int selectedItem = ListBoxGetSelected(sldGUI, sldListbox);
 Ã,  Ã, 
 Ã,  Ã, // Ã, update the savegame list (seleted item is reset here ot 0!):
 Ã,  Ã, ListBoxSaveGameList(sldGUI, sldListbox);
 Ã,  Ã, 
 Ã,  Ã, // Ã, get the number of slots (it's == number of the items in a listbox):
 Ã,  Ã, int totalSlots = ListBoxGetNumItems(sldGUI, sldListbox);
 Ã,  Ã, 
 Ã,  Ã, // Ã, if we have exceeded the limits display a warning message:
 Ã,  Ã, //if (totalSlots > SAVELOAD_SLOTS_MAX) Display("too many slots!");
 Ã,  Ã, 
 Ã,  Ã, // restore an old value (stored in selectedItem);
 Ã,  Ã, ListBoxSetSelected(sldGUI, sldListbox, selectedItem);
 Ã, 
 Ã,  Ã, // Ã, return the number of saved slots:
 Ã,  Ã, return totalSlots;
}


function OpenDialogGUI() {
//=---------------------------------------------------------------------=
// Ã, Initializes and then finally opens the save/load dialog:
//=---------------------------------------------------------------------=

 Ã,  Ã, CentreGUI(sldGUI); Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  // Ã, centre the save/load GUI;
 Ã,  Ã, GUIOn(sldGUI); Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  // Ã, turn the related GUI on;
 Ã,  Ã, UpdateSaveLoadDialogGUI(); Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  // Ã, refresh GUI's content (show saved games);
 Ã,  Ã, ListBoxSetSelected(sldGUI, sldListbox, -1); Ã,  Ã,  Ã, // Ã, remove the highlight:
 Ã,  Ã, 
 Ã,  Ã, // Ã, if the textbox is specified:
 Ã,  Ã, if (sldTextbox != -1)
 Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã, SetTextBoxText(sldGUI, sldTextbox, ""); Ã,  Ã,  Ã, // Ã, clear textbox;
 Ã,  Ã, }
 Ã,  Ã, 
 Ã,  Ã, Wait(1); Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  // Ã, update the screen to show the GUI;
 Ã,  Ã, SetMouseCursor(6); Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  // Ã, override cursor to look like an arrow;
}


function CloseSaveLoadDialog() {
//=---------------------------------------------------------------------=
// Ã, Closes the save/load dialog:
//=---------------------------------------------------------------------=
 Ã, 
 Ã,  Ã, SetDefaultCursor(); Ã,  Ã,  Ã,  Ã,  // Ã, restore cursor appearence;
 Ã,  Ã, GUIOff(sldGUI); Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  // Ã, turn the related GUI off;
 Ã,  Ã, sldGUI = -1; Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, free save/load dialog GUI;
}


function interface_click_SaveLoadDialogGUI(int button) {
//=---------------------------------------------------------------------=
// Ã, Processes clicks on a save/load dialog GUI.
// Ã, Note: it must be called from within the interface_click function!
//=---------------------------------------------------------------------=


//-------------------------------------------------------------------
 Ã,  Ã, // if click on a *listbox item*:
 Ã,  Ã, if Ã,  Ã,  Ã, (button == sldListbox)
 Ã,  Ã, {
 Ã,  Ã,  // Ã, Show currently selected saved slot's description in a textbox:
 Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, give us a temp buffer to transfer string:
 Ã,  Ã,  Ã,  Ã, string buffer;
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, get selected item:
 Ã,  Ã,  Ã,  Ã, int selectedItem = ListBoxGetSelected(sldGUI, button);
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, copy saved game description into 'buffer':
 Ã,  Ã,  Ã,  Ã, ListBoxGetItemText(sldGUI, button, selectedItem, buffer);

 Ã,  Ã,  Ã,  Ã, // Ã, and finally, if the textbox exists:
 Ã,  Ã,  Ã,  Ã, if (sldTextbox != -1)
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, fill the textbox with what is stored in 'buffer':
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, SetTextBoxText(sldGUI, sldTextbox, buffer);
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã, }
//-------------------------------------------------------------------
 Ã,  Ã, // if click on a *save button* or *enter key* is pressed:
 Ã,  Ã, else if ( (button == sldSaveButton) || ((button == sldTextbox) && (sld_bDoSaveOnEnterPressed == 1)) )
 Ã,  Ã, {
 Ã,  Ã,  // Save a game to slot:
 Ã,  Ã,  
 Ã,  Ã,  Ã,  Ã, // Ã, get total the number of slots:
 Ã,  Ã,  Ã,  Ã, int totalSlots = UpdateSaveLoadDialogGUI();
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, get selected item:
 Ã,  Ã,  Ã,  Ã, int selectedItem = ListBoxGetSelected(sldGUI, sldListbox);
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, allocate string to transfer slot description:
 Ã,  Ã,  Ã,  Ã, string strDescription;
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, fill 'strDescription' with the message in a listbox:
 Ã,  Ã,  Ã,  Ã, GetTextBoxText(sldGUI, sldTextbox, strDescription);
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, if there is no text description then set default SLD_DESCRIPTION_DEFAULT:
 Ã,  Ã,  Ã,  Ã, if (StrLen(strDescription) == 0) StrCopy(strDescription, SLD_DESCRIPTION_DEFAULT);
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, if it's not out of bounds...
 Ã,  Ã,  Ã,  Ã, if ( ( selectedItem >= 0 ) && ( selectedItem < SAVELOAD_SLOTS_MAX ) )
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, overwrite save game slot (with a GUI temporarily disabled):
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, GUIOff(sldGUI);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, SetDefaultCursor();
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, SaveGameSlot(savegameindex[selectedItem], strDescription);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, SetMouseCursor(6);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, GUIOn(sldGUI);
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã,  Ã,  Ã, // Ã, if there is no slot selected...
 Ã,  Ã,  Ã,  Ã, else if ( (selectedItem == -1) && (totalSlots < SAVELOAD_SLOTS_MAX) )
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, save to a new slot (with a GUI temporarily disabled):
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, GUIOff(sldGUI);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, SetDefaultCursor();
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, SaveGameSlot(totalSlots + 1, strDescription);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, SetMouseCursor(6);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, GUIOn(sldGUI);
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã,  Ã,  Ã, else
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, display a warning message (slots limit was exceeded):
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Display(SLD_MESSAGE_TooManyGameSlots);
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, update the save/load GUI
 Ã,  Ã,  Ã,  Ã, UpdateSaveLoadDialogGUI();
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, remove the highlight:
 Ã,  Ã,  Ã,  Ã, ListBoxSetSelected(sldGUI, sldListbox, -1);
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, clear a textbox;
 Ã,  Ã,  Ã,  Ã, SetTextBoxText(sldGUI, sldTextbox, "");
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, if the sld_bCloseGUIAfterSave flag is true then close the GUI:
 Ã,  Ã,  Ã,  Ã, if (sld_bCloseGUIAfterSave == 1)
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, CloseSaveLoadDialog(); // close the save/load GUI;
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã, }
//-------------------------------------------------------------------
 Ã,  Ã, // if click on a *load button*:
 Ã,  Ã, else if (button == sldLoadButton)
 Ã,  Ã, {
 Ã,  Ã,  // Try to delete a saved slot:
 Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, get selected item:
 Ã,  Ã,  Ã,  Ã, int selectedItem = ListBoxGetSelected(sldGUI, sldListbox);
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, if it's not out of bounds...
 Ã,  Ã,  Ã,  Ã, if ( ( selectedItem >= 0 ) && ( selectedItem < SAVELOAD_SLOTS_MAX ) )
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, restore game from the slot:
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, RestoreGameSlot(savegameindex[selectedItem]);
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã,  Ã,  Ã, else // Ã, otherwise...
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, display a message (as slot isn't selected):
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Display(SLD_MESSAGE_NoItemSelectedToLoad);
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, update the save/load GUI
 Ã,  Ã,  Ã,  Ã, UpdateSaveLoadDialogGUI();
 Ã,  Ã, }
//-------------------------------------------------------------------
 Ã,  Ã, // if click on a *delete button*:
 Ã,  Ã, else if (button == sldDeleteButton)
 Ã,  Ã, {
 Ã,  Ã,  // Try to delete a saved slot:

 Ã,  Ã,  Ã,  Ã, // Ã, get selected item:
 Ã,  Ã,  Ã,  Ã, int selectedItem = ListBoxGetSelected(sldGUI, sldListbox);
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã, // Ã, if it's not out of bounds...
 Ã,  Ã,  Ã,  Ã, if ( ( selectedItem >= 0 ) && ( selectedItem < SAVELOAD_SLOTS_MAX ) )
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, delete the slot:
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, DeleteSaveSlot(savegameindex[selectedItem]);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, update the save/load GUI and get the number of items:
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, int totalSlots = UpdateSaveLoadDialogGUI();
 Ã,  Ã,  Ã,  Ã, 
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, When we delete *the last* slot the highlight is
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, removed, so we should get it back by highlighting
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, a new last slot:
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, if (ListBoxGetSelected(sldGUI, sldListbox) == -1)
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, highlight the last item if required:
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, ListBoxSetSelected(sldGUI, sldListbox, totalSlots - 1);
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã,  Ã,  Ã, else // Ã, otherwise...
 Ã,  Ã,  Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, // Ã, display a message (as slot isn't selected):
 Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Display(SLD_MESSAGE_NoItemSelectedToDelete);
 Ã,  Ã,  Ã,  Ã, }
 Ã,  Ã, }
//-------------------------------------------------------------------
 Ã,  Ã, // if click on a *cancel button*:
 Ã,  Ã, else if (button == sldCancelButton)
 Ã,  Ã, {
 Ã,  Ã,  Ã,  Ã, CloseSaveLoadDialog(); // close the save/load GUI;
 Ã,  Ã, }

}


function OpenSaveLoadDialog() {
//=---------------------------------------------------------------------=
// Ã, Opens the *save/load* combo dialog:
//=---------------------------------------------------------------------=

 Ã,  Ã, // Ã, Setting up the GUI (pass -1 if the GUI object is unused!):
 Ã,  Ã, // Ã, ------------------------GUI---tbox--lbox--save--load--del--cancel
 Ã,  Ã, PrepareSaveLoadDialog( Ã,  Ã,  Ã,  10, Ã, 0, Ã,  Ã, 1, Ã,  Ã, 4, Ã,  Ã, 3, Ã,  5, Ã,  Ã, 6 Ã, );
 Ã,  Ã, 
 Ã,  Ã, // Ã, Open GUI:
 Ã,  Ã, OpenDialogGUI();
}


function OpenSaveDialog() {
//=---------------------------------------------------------------------=
// Ã, Opens the *save* dialog:
//=---------------------------------------------------------------------=

 Ã,  Ã, // Ã, Setting up the GUI (pass -1 if the GUI object is unused!):
 Ã,  Ã, // Ã, ------------------------GUI---tbox--lbox--save--load--del--cancel
 Ã,  Ã, PrepareSaveLoadDialog( Ã,  Ã,  Ã,  8, Ã,  Ã,  3, Ã,  Ã, 2, Ã,  Ã, 0, Ã,  -1, Ã,  5, Ã,  Ã, 1 Ã, );
 Ã,  Ã, 
 Ã,  Ã, // Ã, Open GUI:
 Ã,  Ã, OpenDialogGUI();

}


function OpenLoadDialog() {
//=---------------------------------------------------------------------=
// Ã, Opens the *load* dialog:
//=---------------------------------------------------------------------=

 Ã,  Ã, // Ã, Setting up the GUI (pass -1 if the GUI object is unused!):
 Ã,  Ã, // Ã, ------------------------GUI---tbox--lbox--save--load--del--cancel
 Ã,  Ã, PrepareSaveLoadDialog( Ã,  Ã,  Ã,  9, Ã,  Ã, -1, Ã,  Ã, 0, Ã,  -1, Ã,  Ã, 1, Ã, -1, Ã,  Ã, 2 Ã, );
 Ã,  Ã, 
 Ã,  Ã, // Ã, Open GUI:
 Ã,  Ã, OpenDialogGUI();
}





function on_event(int event, int data) {
 Ã, // called when an event happens (see AGS manual for details)
 Ã, 
 Ã,  Ã, // Ã, inform our save/load GUI of the event;
 Ã,  Ã, on_event_SaveLoadDialogGUI(event, data);
}
SMF spam blocked by CleanTalk