HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Game Cache - hero store

03-16-2008, 06:44 PM#1
Malfurion
I want to make my own campaign, but I have one problem:
I want to store my Hero into a Game-Cache, but when the next map loads, he hero didn't appear :(
It looks like this:

Event:
Player 1 leaves game with victory
Condition:
Action:
Game Cache - Create game-cache form something.w3v
Set SomeVariable = (last created game cache)
G C - Store someunit as somelable of somecategory in somevariable (I tried it without variable too)
G C - save somevariable

on the next map:

Event:
map initialization
Condition:
Action:
G C - Create Game Cache from something.w3v
G C - Restore somelable of somecategory from (last created game cache) for player 1 at (center of area xxxx)
set herovariable = (last restored unit)

what did I wrong?
Should I use special names for the Lable, category, variable and game cache?

And my map changeover looks like this
Event:
map initialization
Condition:
Action:
Game - set next level to map002.w3x

In my campaign editor it now looks like this:
03-17-2008, 02:18 AM#2
TheSecretArts
try restoring the unit after it is saved BEFORE you end the game the game to make sure it saved.
03-17-2008, 09:30 AM#3
RolePlaynGamer
Also try using "Time Elapsed 0.01" instead of Map Initialization, because Map Initialization doesn't always work.
03-17-2008, 07:37 PM#4
Malfurion
hmm... after i imported some music I got a kompilation-failure or something like this. Now my map won't open again :( but I wont give up and make a new one ^^ but could someone post with this trigger-function of the forum the whole correct trigger for the unit-storing gamecache?
thank you
03-17-2008, 09:10 PM#5
RolePlaynGamer
The save trigger

Trigger:
Collapse Events
Player - Player 1 (Red) leaves the game with a victory
Conditions
Collapse Actions
Game Cache - Create a game cache from Everwood.w3v
set GameCache = (last created game cache)
Game Cache - Store Thrall 0000 <gen> as thrall of hero in GameCache

And then the load trigger

Trigger:
Collapse Events
Time - elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Game Cache - Restore thrall of hero from GameCache for Player 1 (Red) at (Player 1 (Red) start location) facing 0.00