Anonymous user
Creating Custom Save and Load Dialogs: Difference between revisions
Creating Custom Save and Load Dialogs (view source)
Revision as of 20:17, 4 September 2006
, 4 September 2006→Script the Save Button
*>CMK2901 No edit summary |
*>CMK2901 |
||
Line 89: | Line 89: | ||
}</code> | }</code> | ||
This code first checks that the text box is not empty. It then checks whether the | This code first checks that the text box is not empty. It then checks whether the save name in the text box is already being used. If so, it overwrites. If not, a new save is created, if there is enough room - AGS is currently limited to 20 save slots. Immediately before saving, the "Save" GUI is closed, so the player can keep playing. | ||
It is important that anything you want to do when saving is placed '''before/above''' the "SaveGameSlot()" commands. Anything below "SaveGameSlot()" will be executed, but NOT saved into the file, because it occurs after the save command. | It is important that anything you want to do when saving is placed '''before/above''' the "SaveGameSlot()" commands. Anything below "SaveGameSlot()" will be executed, but NOT saved into the file, because it occurs after the save command. | ||
== Script the Delete Button == | == Script the Delete Button == |