• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

game cache restore hero

Status
Not open for further replies.
Level 3
Joined
Jul 27, 2010
Messages
35
Hello!

i have finished my first map in my campaign, but i got problems loading and restoring it to my second map!


Variables: TutorialCache Type: Game Cache initial Value: None


here is the map 1 trigger:


Game cache

  • Map initialization
  • Game Cache - Create a game cache from TutorialCache.w3v
  • Game Cache - Save TutorialCache

Store Hero

  • Game Cache - Store Paladin 0000 <gen> as Paladin of Heros in TutorialCache
  • Game Cache - Save TutorialCache


And now in map 2 where i want my unit to respawn with the same stats etc..


Game Cache

  • Map initialization
  • Game Cache - Create a game cache from TutorialCache.w3v
  • Set TutorialCache = (Last created game cache)
Restore unit attempt

  • Time - Elapsed game time is 0.00 seconds
  • Game Cache - Restore Paladin of Heros from TutorialCache for Player 1 (Red) at (Center of paladin spawn <gen>) facing 355.00

First time i tried this on my real map i added store gold and hero name but since it dident work, i tried on two test maps and even then it dident worked!
Feels like a such an easy thing, but i still cant make it work. :goblin_cry:

Please help me out here!


Also: i read Bob27's http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/game-caches-6273/ tutorial when i tried this!
 
Last edited:
Level 10
Joined
May 21, 2006
Messages
323
Is the name of the Campaign also TutorialCache ? because there has to stand the exact Campaignname also I want to say that there is a DemoCampaign made by Blizzard in the Campaign folder you can use this to check out all the conditions you have to create. But I see no other causing mistake, sorry.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You have to use the action

Gamecache - Reload all data from disk

After creating the Gamecache i think maybe before you have to try
This.
The actions should be something like this:
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempLoc = Center of Enter Map <gen>
      • Game Cache - Create a game cache from Whatever.w3v
      • Game Cache - Reload all game cache data from disk
      • Game Cache - Restore Lich of Heroes from (Last created game cache) for Player 1 (Red) at tempLoc facing 0.00
      • Custom script: call RemoveLocation( udg_tempLoc )
Of course, in your case the label, category and game cache names are different.

Is the name of the Campaign also TutorialCache ? because there has to stand the exact Campaignname also I want to say that there is a DemoCampaign made by Blizzard in the Campaign folder you can use this to check out all the conditions you have to create. But I see no other causing mistake, sorry.
This is not true: the name of the game cache does not matter (it doesn't even have to be an existing file).



Edit: in case you want to see my full triggers:
Map 1:

  • Next Map
    • Events
      • Unit - A unit enters Next Map <gen>
    • Conditions
    • Actions
      • Game Cache - Create a game cache from Whatever.w3v
      • Game Cache - Store Lich 0001 <gen> as Lich of Hero in (Last created game cache)
      • Game Cache - Save (Last created game cache)
      • Game - Set the next level to Map2.w3x
      • Game - Victory Player 1 (Red) (Show dialogs, Skip scores)

Map 2:

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempLoc = (Center of Enter Map <gen>)
      • Game Cache - Create a game cache from Whatever.w3v
      • Game Cache - Reload all game cache data from disk
      • Game Cache - Restore Lich of Hero from (Last created game cache) for Player 1 (Red) at tempLoc facing 0.00
      • Custom script: call RemoveLocation( udg_tempLoc )
That's all the triggers I have in my demo-campaign :p
 
Status
Not open for further replies.
Top