• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Game Cache help needed

Status
Not open for further replies.
As you know, Game Cache's save info to be transferable to other maps within the same campaign. To save info, you need to use the 'Game Cache - Store ...' command. To store a unit (including items and abilities), you only need to use 'Game Cache - Store Unit'. Set the unit you want to store to a unit variable, like Unit1 and place it in the Store Unit command, giving you
  • Game Cache - Store Unit1 as Label of Category in (Last created game cache)
Give it a Label of which you can recognise what kind of info it is, like Hero. Now you have a command like:
  • Game Cache - Store Unit1 as Hero of Category in (Last created game cache)
Give it a category to separate stuff within the Game Cache's, like HeroCategory, and you have a trigger like

  • Game Cache - Store Unit1 as Hero of HeroCategory in (Last created game cache)
Now make a Game Cache variable where all data will be loaded from, like GameCache1, giving you a full command that allows you to save the unit's inventory, EXP, level, abilities and stuff like that. Your command will look like
  • Game Cache - Store Unit1 as Hero of HeroCategory in GameCache1
Now save GameCache1 and remove the unit you saved (unless you're not going to leave the map after saving the Game Cache, but that would be useless).


In the new map, you use the command 'Game Cache - Reload all game cache data from disk' and 'Game Cache - Restore Hero of HeroCategory from GameCache1 for <YOUR PLAYER> at <YOUR REGION> facing <YOUR DIRECTION>)'

Tadah! Your info has been stored and got loaded into your new map.
 
current game cache triggers

I can't get it to work.
current game cache triggers:

Variable: "type=Game Cache" "array not marked"

Frist Trigger

  • Events: Map initialization
  • Actions:
  • Game Cache - Create a game cache from variable.w3v
  • Set variable = (last created game cache)
  • Game Cache - Save variable
Second Trigger

  • Events: Player1 types done as an exact message
  • Actions:
  • Game Cache - Store Pilot1 0000 as Avatar of unitCatergory in variable
  • Game Cache - Store (level of Laser Turret for Pilot1 0000 as Avatar of UnitCategory in variable.
  • Game Cache - Save variable
Third Trigger (in map2)

  • Events: Map initialization
  • Actions:
  • Game Cache - Create a game cache from variable.w3v
  • Set variable = (last created game cache)
  • Game Cache - Reload all game cache data from disk.
  • Game Cache - Restore Avatar of UnitCatergory from variable for Player1 at (Player 1 (Red) start location)...
 
Status
Not open for further replies.
Back
Top