Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: mwahahaha on Sat 07/01/2006 01:27:49

Title: Triggering autosaves.
Post by: mwahahaha on Sat 07/01/2006 01:27:49
Could someone please tell me how you trigger autosaves in AGS games like for when you enter a room?  Preferably without coding.
Title: Re: Triggering autosaves.
Post by: Ishmael on Sat 07/01/2006 01:36:30
AGS has no autosave feature per se, but you can do it by saving a game with a description of your choise to some high number slot - like 99 - and then restore that slot on quickload or such.
Title: Re: Triggering autosaves.
Post by: Ashen on Sat 07/01/2006 16:06:29
There's no way to do it without coding, but fortunately it's a very simple bit of code:

SaveGameSlot(99, "Autosave");

(If you want, you can get fancy and use the DateTime functions to add the date and time - but that's more coding.)

As Ishmael said, just run it in Player enters screen, or wherever you want to trigger the save. However, depending on your game, be carefull how you use it - check out Vince Twelve's 'bug' in 1213 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=24236.msg301325#msg301325) (not that that's likely to be a problem with a more traditional adventure game).