• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Save Load Code

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,240
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