HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Game Caches

06-23-2004, 05:40 PM#1
High Loremaster
I posted this thread in the Warcraft Editing Tools forum before I realized that there was a section devoted to trigger problems, sorry:

Currently, I am making a Warhammer RPG on the world editor. However, I have run into a slight problem. If you have ever played the Frozen Throne Orc campaign RPG thingy, then you know that you can go back and forth between different maps while keeping your hero and all of his experience and items. I know that to do this between maps, you have to use the "Game Cache" trigger actions. I have tried several combinations of game caches of loading and saving, but I can't seem to save a hero from one map to the next. Any help would be appriciated.
06-23-2004, 05:48 PM#2
ForgottenLight
I had the same problem in a campaign I made a while back. You saving trigger is probably okay, but in the loading trigger you need:

Game Cashe - Create (*the name you saved it as in you previous map*)
Game Cashe - Reload Alll
(*what ever you need to load*)

I know that's confusing as heck, It took me forever to figure that out, cause "Create Game Cashe" doesn't sound like what you need, but it's sort of mislabled, because it gets a GameCashe instead of creating one, if the name you put in already exists.
06-23-2004, 10:10 PM#3
High Loremaster
Wait, I'm still not getting it right. This is what I have for the trigger in the first map:

Events:
A unit enters save game cache 1 <gen>
Conditions:
Actions:
Game Cache- Store (Entering unit) as P1 Hero of Heroes in (Last created game cache)
Game Cache- Save (Last created game cache)

And this is what I have for the trigger in the map you go to:

Events:
Map initialization
Conditions:
Actions:
Game Cache- Create a game cache from Warhammer RPG test.w3z
Game Cache- Reload all game cache data from disk
Game Cache- Restore P1 Hero of Heroes from (Last created game cache) for P1 (Red) at (Center of hero appear m2) facing 90 degrees

Warhammer RPG test.w3z is what I saved the first map under when loading to the second map.
06-24-2004, 03:03 AM#4
ForgottenLight
Where are you creating the Cashe in the first place in the first trigger?


Actions
Game Cache - Create a game cache from CasheFileName.w3v
Game Cache - Store (Entering unit) as P1 Hero of Heros in (Last created game cache)
Game Cache - Save (Last created game cache)


and


Actions
Game Cache - Create a game cache from CasheFileName.w3v
Game Cache - Reload all game cache data from disk
Game Cache - Restore P1 Hero of Heros from (Last created game cache) for Player 1 (Red) at (Center of yourRegion) facing whatever


I could be that one line I Highlighted, you have to save and load a cashe file, not just the name of you map file, the above triggers should work, but I don't think you should use a unit enters region event to trigger the first one, cashes should run with you victory trigger like this:


Actions
Game Cache - Create a game cache from CasheFileName.w3v
Game Cache - Store (Entering unit) as P1 Hero of Heros in (Last created game cache)
Game Cache - Save (Last created game cache)
Game - Set the next level to Maps\MapName.w3m
Game - Victory Player 1 (Red) (Show dialogs, Show scores)


Try that.
06-24-2004, 03:34 AM#5
High Loremaster
I tried both of the suggestions and they don't seem to be working. I can, however, save a unit on a map and load him again on the same map, so I have no idea what I could be doing wrong.
06-24-2004, 03:44 AM#6
ForgottenLight
Humm, Well, I don't know what is happening, what about the last thing, putting the cashe in the victory trigger. OH WAIT, I remember someone saying something about putting a clear cashe action in there somewhere, I think it was between Create and Reload All in the Loading trigger, I'm not sure... Is anything else happening after you save the cashe and before you change levels?
06-24-2004, 02:15 PM#7
High Loremaster
No, nothing else is happening. I have tried making the trigger activate with everything from killing a unit to getting killed yourself, and nothing works. I am totally stumped.
06-24-2004, 03:42 PM#8
ForgottenLight
Did you also put it in the victory trigger like I suggested?
From your descriptions, it is saving the unit okay, because you can reload it in the same map, so the logical conclusion is, something is happening between the loading of the new map and the loading of the hero that is preventing the hero from being loaded... Recheck the triggers in your second map, or post em here...
06-24-2004, 03:50 PM#9
High Loremaster
I found out why it won't work. It turns out that you cannot use Game Caches in multiplayer games. Thanks for your help anyways, man.
06-24-2004, 05:29 PM#10
ForgottenLight
Oh, you never said it was a multiplayer map, that would have cleared that up.