• 🏆 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!

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?
 
Level 1
Joined
May 20, 2017
Messages
4
This is what trigger I use
 

Attachments

  • 342739.jpg
    342739.jpg
    104.2 KB · Views: 43
  • 342738.jpg
    342738.jpg
    126.8 KB · Views: 45
  • 342737.jpg
    342737.jpg
    96 KB · Views: 22
  • 342736.jpg
    342736.jpg
    97.8 KB · Views: 41
  • 342735.jpg
    342735.jpg
    95.3 KB · Views: 20
Level 28
Joined
Feb 18, 2014
Messages
3,580
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.
 
Level 1
Joined
May 20, 2017
Messages
4
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.
Top