• 🏆 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 hero's previous data?

Status
Not open for further replies.
Level 3
Joined
Oct 29, 2009
Messages
48
How do I save a hero's level, skills learned and items data from the previous map to the next map? I mean if a campaign is won and goes to the next level, how do I make it keep the hero's current data from the previous map?
 
Level 3
Joined
Oct 29, 2009
Messages
48
Yes I did try it, but I'm not sure if the triggers I used was correct, can you show how you triggered it from the first map to the second map? (from saving to loading) thanks!

a screeny would do!
 
Level 5
Joined
Nov 11, 2009
Messages
172
  • GameCacheSave
    • Events
    • Conditions
    • Actions
      • Game Cache - Create a game cache from YourMapName.w3v
      • Game Cache - Store YourHero as Hero of Heroes in (Last created game cache)
  • GameCacheLoad
    • Events
    • Conditions
    • Actions
      • Set tempPoint = (Center of YourRegion)
      • Game Cache - Restore Hero of Heroes from (Last created game cache) for YourPlayer at tempPoint facing 0.00
      • Custom script: call RemoveLocation (udg_tempPoint)
 
Level 3
Joined
Oct 29, 2009
Messages
48
ah, ok

{EDIT}
anyway, is the command for that line "Set TempPoint = Center region" thingy used in the "set Variable" command?


EDIT2;

OK, I put up all trigger already done, but how do I call it? should it still be worked with the "Run Trigger" command? cause when I did, it doesn't transport me to the next map, instead it brings me back to the chapter selection when it's supposed to immediately go to the next map after victory.
 
Last edited:
Level 9
Joined
Dec 12, 2007
Messages
489
off-topic: I don't think bumping for that reason is acceptable...
on-topic: have you try this:
  • Actions
    • Game - Set the next level to Maps\MapName.w3m
    • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
    • Game - Defeat Player 2 (Blue) with the message: Defeat!
this is just an example...
 
Level 3
Joined
Oct 29, 2009
Messages
48
Dark_axl- thats already in my trigger, but still it won't work.

Frunk- OK, I put up all Game cache trigger already (the one you showed, Trigger "Save Cache" and Trigger "Load Cache") , but how do I call it? should it still be worked with the "Run Trigger" command? cause when I did, it doesn't transport me to the next map when victory, instead it brings me back to the chapter selection when it's supposed to immediately go to the next map after victory.
 
Level 5
Joined
Nov 11, 2009
Messages
172
  • GameCacheSave
    • Events
    • Conditions
    • Actions
      • Game Cache - Create a game cache from MapName.w3v
      • Game Cache - Store Unit as Hero of Heroes in (Last created game cache)
      • Game Cache - Save (Last created game cache)
      • Game - Set the next level to Maps\YourMap.w3m
      • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
Try this, and make sure the path to the next level is correct (even with the folders) Then use the same load I posted earlier.
As event you can put anything, for example a unit enters a region that will move you to the next map.
 
Last edited:
Level 3
Joined
Oct 29, 2009
Messages
48
ok, thanks! anyway

in this line:
"Game Cache - Create a game cache from MapName.w3v"

should the mapname be the:

1. Name of the map ur currently in?
2. Name of the map ur going to nxt level?
3. Name of the Campaign's file?
 
Level 9
Joined
Dec 12, 2007
Messages
489
ok, thanks! anyway

in this line:
"Game Cache - Create a game cache from MapName.w3v"

should the mapname be the:

1. Name of the map ur currently in?
2. Name of the map ur going to nxt level?
3. Name of the Campaign's file?
well, that can be any name you put there with extension .w3v ...
it just have to match with the name of the cache you load at the other map...
just 1 thing, if I'm not wrong, once you choose a name for the cache, you shouldn't
change it to other name in case that you save the cache regarding the gamecache limit.
 
Level 3
Joined
Oct 29, 2009
Messages
48
hmm, It still doesn't load next map, buuut! I think I know what the problem is... I think it had something to do with the load Cache in the next map, cause when I removed the Load cache in the next map, it already loaded the next map after finishing the first map (although hero data wasn't loaded) just to give u guys a clue.

btw, pls tell me what wrong I did when I put the load Cache triggers along with the Initialization event along with cinematics?

What I did:

Event: Initialization

Conditions:

Triggers:

Set tempPoint = (Center of YourRegion)
Game Cache - Restore Hero of Heroes from (Last created game cache) for YourPlayer at tempPoint facing 0.00
Custom script: call RemoveLocation (udg_tempPoint)
Cinematics - blah blah
Cinematics - blah blah
Cinematics - blah blah

btw, if this can't be solved, can someone link a Download link for the WC3's Demo Campaign for Wc3 version 1.24.1? cause my WE cant seem to open the campaign anymore, maybe since it's too old already or it didnt match the version. (honestly, I used that Demo Campaign as a base for making campaign before, but now that I forgot, I got nothing without it)
 
Level 3
Joined
Oct 29, 2009
Messages
48
Frunk: ok I understand about the init-tiem elapsed. but, what do you mean by "change yourhero to the player loading, (Player 1 I guess) Same with region. " does it mean I change the Hero of Category into the player loading? btw, where can I find this line?:

Game Cache - Save (Last created game cache)

I dnt think I can find it anywhere.

DarkHorse08 - Save/load? I heard those had something to do when making RPG maps right? not campaign.
 
Level 4
Joined
Aug 13, 2009
Messages
57
the "Game Cache - Save" is removed in a recent war3 patch, (perhaps an accident, who knows)

instead you can use custom script "call SaveGameCacheBJ(udg_VariableHere )"
exactly like that.

hope this helps.

im having game cache loading problems myself, thats how i came across this thread..

EDIT: finally success!, when restoring your hero make sure you create gamecache FIRST in your second map (create it with identical name as used in first map), set that cache to your variable.

then restore your hero in a seperate trigger, this has just worked for me.
 
Last edited:
Status
Not open for further replies.
Top