Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: guga2112 on Fri 25/09/2020 09:45:21

Title: [SOLVED] Confusion about savegames and room_Load
Post by: guga2112 on Fri 25/09/2020 09:45:21
Long story short: I had a room where I disabled a walkable area in room_Load, but I had a savegame (inside that room) where this didn't happen.

I thought it was a bug either in the savegame system (why hadn't the state of the walkable been saved?) or in the load system (why doesn't restoring the game call room_Load?).

It turned out it was neither of them, but the savegame was from an older build where the walkable had NOT been disabled beforehand. So the savegame system saved its state correctly (in that game, it was enabled). As for not calling room_Load, it's also correct, because otherwise it would run the "enter room" script every time you load a game, while in the savegame you already are in that room.

(Then I tried to delete the topic because I thought nobody had read/answered, but I was wrong.
Title: Re: Possible bug? Loaded game does not call room_Load or room_AfterFadeIn
Post by: Crimson Wizard on Fri 25/09/2020 09:48:46
It's supposed to store all the current room status and restore it from the save. Need to test this to see why it does not.

At which point exactly do you save the game (what are walkable area states)?
Title: Re: EDIT: I'm dumb and this is not a problem
Post by: guga2112 on Fri 25/09/2020 09:51:02
No, it was a savegame from a wrong game version where I forgot to turn off the second walkzone. Then I remembered, but the savegame saved the state. My fault, I'd like to delete this
Title: Re: EDIT: I'm dumb and this is not a problem
Post by: Snarky on Fri 25/09/2020 13:00:01
In general we prefer to let threads like this remain (and that you don't edit out all the info from them) because the next time someone experiences a similar problem, maybe they'll do a search, find the thread and realize they made the same mistake.
Title: Re: EDIT: I'm dumb and this is not a problem
Post by: guga2112 on Fri 25/09/2020 13:48:06
Sorry, I was trying to remove everything before noticing someone had already answered. I'll restore the topic :)
Title: Re: [SOLVED] Confusion about savegames and room_Load
Post by: Snarky on Fri 25/09/2020 15:11:34
Thanks!