• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with restoring Hero in next map?

Status
Not open for further replies.
Level 4
Joined
Jan 18, 2016
Messages
29
Can you guys help me see what I'm doing wrong?

I'm basically trying to create a campaign, but the problem lies for me in trying to carry the hero from the first map to the next. I've loaded other people campaign to see how they do it, and I feel like I have done it correctly but I still can't.

So I just tried creating a new map just to transfer heroes, and I still can't do it.
Here are my triggers

FIRST MAP
TRIGGER - LEVEL PREP

Game Cache - Create a game cache from TestCampaign.w3v
Game Cache - Store Paladin 0000 <gen> as Paladin of Test_1 in (Last created game cache)
Game Cache - Save (Last created game cache)

TRIGGER - LEVEL START
EVENT = Unit - Paladin 0000 <gen> Gains a level

ACTIONS
Game - Show custom campaign button 2
Game - Set the next level to Test 2.w3m
Game - Victory Player 1 (Red) (Show dialogs, Show scores)


So I'm able to load to my second map, but it doesn't load my Paladin (which is supposed to be level 2).

SECOND MAP
TRIGGER - MAP INTIALIZATION

Trigger - Run Load <gen> (checking conditions)

TRIGGER - LOAD
Game Cache - Create a game cache from TestCampaign.w3v
Game Cache - Restore Paladin of Test_1 from (Last created game cache) for Player 1 (Red) at (Center of (Playable map area)) facing 0.00
Set Hero1 = (Last restored unit)


But yeah, when I start the game, I don't get the level 2 Paladin. Funnily enough, the map isn't supposed to have any units at all, but I do get a Paladin level 1 in the center of the map.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
It makes sense to get a level 1 paladin. In the first map you store the paladin when he's level 1 (you store in trigger LEVEL PREP). You need to store the paladin at the end of the game (at the top of trigger LEVEL START).
Other than everything is fine. After all you load a paladin, you just stored him at the wrong time.
 
Status
Not open for further replies.
Top