| 07-17-2004, 08:22 PM | #1 |
I need a bit of help on saving all data from one map and taking it to another map and back again, a la Blizzard's RPG (The Founding of Durotar). I know how to save all the variables and such to a game cache and all, and I can successfully load it in the next map, but when I go back to the main map, everything is reset. I've loaded all the variables in both maps, but some of them don't seem to set for some reason. Like, for instance, I have a variable that checks how many weapons you have. If you have 2, you can't pick up another one. Say I have two weapons going from Map 1 (Pelennor) to Map 2 (Ithilien West). I enter Map 2, and I still have two weapons. I pick up another weapon, it drops it due to error. So I go back to the main map, pick up another weapon (I still have two) and it lets me have it. I have the triggers to only allow 2 on both maps, but it doesn't register. Any help would be appreciated, if it's not too complex. |
| 07-18-2004, 02:44 PM | #2 |
Blizzard uses forced saving and loading of a map to keep most of the information. The info that actually changes when you come back from another map is then loaded from gamecache. |
| 07-18-2004, 07:28 PM | #3 |
So it's a mistake that I myself made, and not with the system? |
| 07-18-2004, 10:12 PM | #4 |
Hard to say since you did not actually post your triggers. But I think you actually wanted the first map to be preserved which only works with the saving/loading method. That is why I posted that info. |
| 07-19-2004, 05:02 AM | #5 |
I want the first map to carry over to the second map, and the second map's updates/state to be carried to the first map when the heroes return. So both maps will be stored. But when both maps are stored, the first map doesn't return to the saved state, is what I'm trying to say. Should I clear the first map's cache before loading the previous one? |
| 07-19-2004, 06:23 AM | #6 |
To transfer the changes the gamecache is used. But you have to actually write code that applies those changes to the original map according to what is in the gamecache. If you want to preserve more of the original map forve save it before loading the new one and then apply the changes to the first map in the Savegame load event (and reload the caches from disk). To see where the actual problems in your triggers are you'd have to post them here. |
