Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Mugs on Wed 21/12/2005 05:07:02

Title: Displaying a message when there are no saved games (SOLVED)
Post by: Mugs on Wed 21/12/2005 05:07:02
Alright, I looked everywhere, I looked in the manual, I tried so many things and I can't get this thing to work(I'm having lot's of trouble lately  :( )

To prevent people from loading empty game slots, I want it to do so that if you click on the load icon (the icon that turns the GUI visible) and that there's no saved games, I want it to display a message instead.  When I try to create a script, the message gets diplayed even if I have a saved game.

What should I to do,  to make it work?     
Title: Re: I want it to display a message when there are no saved games.
Post by: Akumayo on Wed 21/12/2005 05:27:58
I have a solution.Ã,  Create a list box on a new gui.Ã,  Name the list box savedgames.Ã,  Make the GUI a popup modal so it doesn't display.  The player never needs to see it.Ã,  Now for coding:

In the 'load' button's script:

savedgames.FillSaveGameList();
if (savedgames.ItemCount != 0) {
Ã,  //script to turn on the load game list
}
else {
Ã,  Display("There are no games to load!");
}