Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: That Guy on Wed 10/08/2005 18:41:19

Title: What,exactly, gets stored with SaveGameSlot?
Post by: That Guy on Wed 10/08/2005 18:41:19
Gents,

Let's say I've got a few situations I need to keep track of in-game, like whether or not the hero has visited six specific locations and I want to trigger some kind of event once the they've set foot on the sixth.

Now, I can think of several ways to do it.

One, I can create a global script variable called "numVisits" and bump it up every time they first enter the relevant rooms.  Two, I can stick a custom property on each room and flag it once the player enters, then loop through the rooms and check.  Or three, I can do some variation of the above.

Now, I'd wager that custom properties and special states of each object get saved when a game is saved automatically, but what about script variables?  Can I globally declare a few int counters and rely on them being the same values I set them to during gameplay when the game is restored?

Hope this makes sense, and thanks in advance.

TG
Title: Re: What,exactly, gets stored with SaveGameSlot?
Post by: Ishmael on Wed 10/08/2005 19:57:40
Everything you can declare or change will get saved. All variables, all character positions, object views, everything. It's to work as a 'save' feature afterall, so you can save, quit and continue from the exactly same spot when you next time start the game...