Thank you all, it worked beautifully!

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
function room_AfterFadeIn()
{
Wait(10);
oHorseHouse.SetView(8, 1, 1);
oHorseHouse.Animate(1, 10, eOnce, eNoBlock, eForwards);
oHorseHouse.Move(334, 343, 1, eNoBlock, eAnywhere);
//object[1].StopAnimating();
//oHorseHouse.SetView(8, 0, 1);
oHorseHouse.Animate(0, 10, eRepeat, eNoBlock, eForwards);
//oHorseHouse.Move(66, 329, 1, eNoBlock, eAnywhere);
}
function btn_save_OnClick(GUIControl *control, MouseButton button)
{
gSaveGame.Visible=true;
mouse.UseModeGraphic(eModeWait);
}
function btnSaveGame_OnClick(GUIControl *control, MouseButton button)
{
int totalSaves = lstSaveGames.ItemCount;//number of saves on list
String saveName = txtSaveName.Text; //holds value of txtSaveName textbox
//Check for a save name.If none tell them to enter one, else go on
if(saveName=="")
{
Display("Please enter a name for your save.");
return;
}
//if there is no saved games yet, just save it
if(lstSaveGames.SelectedIndex ==-1)
{
gSaveGame.Visible=false;
SaveGameSlot(totalSaves+1, saveName);
}
else
{
int checkSave=0; //runs through the list and checks for double entries
while (checkSave!=totalSaves)
{
if(saveName == lstSaveGames.Items[checkSave]) //one matches, so overwrite it.
{
//if so overwite the selscted game
gSaveGame.Visible=false;
SaveGameSlot(savegameindex[checkSave],saveName);
return;
}
checkSave++;
}
//if we've made it here, there is no match so just save it to a new slot.
if(totalSaves <20)
{
gSaveGame.Visible=false;
SaveGameSlot(totalSaves+1,saveName);
}
else
{
Display("The maximum number of saved games has been reached; overwrite or delete some old ones.");
}
}
}
QuoteIs it the function gui?
The GUI buttons on the white box at the top suffer from a similar problem; clicking the green box doesn't work half the time, I have to aim for the pixels making up the button's text.
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.071 seconds with 14 queries.