Warcraft III resources & community, 2003–2006 · archived

How to Bring Heroes from the previous map to the next map...

3 posts
#1

How to Bring Heroes from the previous map to the next map...

I have 12 maps here enough to make a campaign. I had put them together and now it is a campaign,but the problem is...The heroes are not saved! Example, in the 1st map, The Blademaster got a level of 5 then I finished the 1st map. Next map does not have the blademaster's stats and learned skills! Heeeeeeeelp!
#2
Of course he isn't there cause you didn't load him.

Wait a moment, I'm typing an example

Edit: OK, jarin was faster. But I can send you my tutorial-maps if you PM me your mail-adress.
(if jarin's excellent example is not enough)
#3
Moving units, variables, objects, or integers from one map to the next requires the use of a Game Cache. You should have a trigger, roughly, looking like this:

EVENTS

Player 1 leaves the game with a Victory

CONDITIONS

(none)

ACTIONS

Game Cache - Create a new game cache from (any name you like)

Game Cache - Store (your hero's variable/name) as (your hero's name, any name will do) in (the name you specified in the first Action)

Game Cache - Save game cache

---------
For example,

EVENTS

Player 1 Leaves the Game With a Victory

CONDITIONS

(none)

ACTIONS

Game Cache - Create a game cache from Campaign.w3v

Game Cache - Store Tojara as Blademaster of Blademaster in Campaign.w3v (Trigger layout may be different than this)

Game Cache - Save Game Cache

------

This should be helpful, when saving the hero. Now let's load the hero in the next map.

-----

EVENTS

Map Initialization

CONDITIONS

(none)

EVENTS

Game Cache - Create a Game Cache from (the name you picked for your game cache, way up there in the first tutorial.)

Game Cache - Restore (your unit's variable) of (your unit's name) at (location) (Layout may be different, but similar)

-----

This will enable map-to-map hero transfer. If you still can't figure it out, ask me anything you like and I'll be glad to help.