• 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.

Save Load Code

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
This is the code for loading units from saved cache:

=====================================================

Restore
Events
Conditions
Actions
Game Cache - Create a game cache from Map1.w3v
Game Cache - Restore MyHero1 of Heroes from (Last created game cache) for Player 1 (Red) at (Center of HeroRestore <gen>) facing 270.00
Set MyHero1 = (Last restored unit)


=====================================================
This is the code for storing units to cache:

SaveUnits
Events
Conditions
Actions
Game Cache - Create a game cache from Map2.w3v
Game Cache - Store MyHero1 as MyHero1 of Heroes in (Last created game cache)
Game Cache - Save (Last created game cache)

=====================================================

These are needed in campaigns to save the setting your hero had in the previous level, like items, stats and experience.
 
Status
Not open for further replies.
Top