Warcraft III resources & community, 2003–2006 · archived

Save Load Code

5 posts
#1

Save Load Code

I just want to know what is save-load code and why is needed in certain maps.
#2
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.
#3
Yes, know how make this thing, but didn't know how is called. I also noticed people requesting and using save-load code in multiplayer RPGs (I think). ???
#5
Better use Emergensy save\load ,because that was the first one i have seen. And ,i think, he have more modifired trigger for this than earlier.