• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

how to save hero level and experience - game cache

Status
Not open for further replies.
Level 1
Joined
May 20, 2017
Messages
4
I know how to store and load a unit but the problem is when I continue to second map the level of is just like the old for example the hero in first map is level 3 then I fight to gain more experience then I finish first map and continue to second map the problem is the hero has been restored but the experience back to zero and the level is back to level 3 how can I solve this problem?
 
This is what trigger I use
 

Attachments

  • 342739.jpg
    342739.jpg
    104.2 KB · Views: 95
  • 342738.jpg
    342738.jpg
    126.8 KB · Views: 96
  • 342737.jpg
    342737.jpg
    96 KB · Views: 68
  • 342736.jpg
    342736.jpg
    97.8 KB · Views: 81
  • 342735.jpg
    342735.jpg
    95.3 KB · Views: 74
Use the [/Trigger] tag to easily post your triggers, also I don't recommend creating a game cache at Map Initialization.
Regarding your triggers, you should first save the hero before saving the game cache :
  • CreateGameCache
    • Events
    • Conditions
    • Actions
      • Game Cache - Create a game cache from MyCache.w3v
      • Set MyCache = (Last created game cache)
      • Trigger - Run SaveRokhan <gen> (checking conditions)
      • Game Cache - Save (Last created game cache)
Before restoring, reload all cache data from disk.
No need to as long as the Game Cache name is the same as the previous mission.
 
Use the [/Trigger] tag to easily post your triggers, also I don't recommend creating a game cache at Map Initialization.
Regarding your triggers, you should first save the hero before saving the game cache :
  • CreateGameCache
    • Events
    • Conditions
    • Actions
      • Game Cache - Create a game cache from MyCache.w3v
      • Set MyCache = (Last created game cache)
      • Trigger - Run SaveRokhan <gen> (checking conditions)
      • Game Cache - Save (Last created game cache)
No need to as long as the Game Cache name is the same as the previous mission.
Thanks I finally succeed in saving my hero my hero level and newly obtained items. Your right its not recommended to add the event map initialization when creating game caches, because the one that it save is the unit you just created and not the one who fights and obtaining items. So thanks...
Sorry for my grammar
 
Last edited:
Status
Not open for further replies.
Back
Top