Problem with moving a hero from one map to another

magnemann

New Member
Reaction score
5
Hello. I saw The Helper's guide on Campaign basics: http://world-editor-tutorials.thehelper.net/campaign.php

I asked a question on hiveworkshop.com regarding how to move a hero from a map to another, when the maps have been added to the campaign editor. (This was before I saw your guide on the subject)
One of the people mentioned something about an MPQ extractor, and I've asked several times on the forum if I need an MPQ extractor to move a hero from a map to another one, and I haven't received a reply.

Question would then be, if I follow The Helper's guide, will I able to do this? Do I need an MPQ extractor?
 

magnemann

New Member
Reaction score
5
Ok guys, I've run into 2 triggers that are in a conflict.

The first one is as following:
Code:
LAST CINEMATIC
    Events
        Unit - Commander 0045 <gen> Dies
    Conditions
    Actions
        Sound - Stop SoundVariable Immediately
        Sound - Stop the currently playing music theme
        Quest - Display to (All players) the Quest Completed message: You have slain the ...
        Quest - Mark KillTheHumanCommander as Completed
        Quest - Flash the quest dialog button
        Sound - Play QuestCompleted <gen>
        Unit - Kill Guardsman 0043 <gen>
        Unit - Kill Guardsman 0044 <gen>
        Unit - Kill Footman 0042 <gen>
        Wait 5.00 seconds
        Unit - Order Murloc Chieftain 0035 <gen> to Move To (Center of Region 010 <gen>)
        Sound - Play HeroicVictory <gen>
        Cinematic - Fade out over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        Camera - Apply Camera 011 <gen> for Player 1 (Red) over 0.00 seconds
        Cinematic - Turn cinematic mode On for (All players)
        Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        Wait 2.00 seconds
        Unit - Make Murloc Chieftain 0035 <gen> face (Center of Region 012 <gen>) over 0.00 seconds
        Cinematic - Send transmission to (All players) from Murloc Chieftain 0035 <gen> named Murkhil: Play No sound and display The Commander is sl....  Modify duration: Set to 6.00 seconds and Wait
        Camera - Apply Camera 012 <gen> for Player 1 (Red) over 10.00 seconds
        Unit - Order Murloc Chieftain 0035 <gen> to Move To (Center of Region 011 <gen>)
        Unit - Create 2 Murloc Tiderunner for Player 1 (Red) at (Center of Region 013 <gen>) facing Default building facing degrees
        Set test1 = (Last created unit)
        Unit - Order test1 to Move To (Center of Region 011 <gen>)
        Unit - Create 2 Murloc Huntsman for Player 1 (Red) at (Center of Region 014 <gen>) facing Default building facing degrees
        Set test2 = (Last created unit)
        Unit - Order test2 to Move To (Center of Region 011 <gen>)
        Unit - Create 1 Murloc Nightcrawler for Player 1 (Red) at (Center of Region 015 <gen>) facing Default building facing degrees
        Set test3 = (Last created unit)
        Unit - Order test3 to Move To (Center of Region 011 <gen>)
        Wait 11.00 seconds
        Cinematic - Fade out over 4.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
        Game - Victory Player 1 (Red) (Show dialogs, Show scores)


And the one with saving the hero is as following:
Code:
Cache save
    Events
        Unit - A unit enters Region 016 <gen>
    Conditions
        (Triggering unit) Equal to Murloc Chieftain 0035 <gen>
        (Owner of (Triggering unit)) Equal to Player 1 (Red)
    Actions
        Game Cache - Store Murloc Chieftain 0035 <gen> as Murkhil of Murlocs in Cache
        Game Cache - Save Cache
        Game - Save game as Murloc map 1.w3z and change level to Maps\Murloc map 2.w3x (Show scores)

When Murkhil enters region 16, the game automatically changes to the next level, however, there is still something left of the cinematic, and the Victory thing is supposed to show up, I don't want it to automatically change level, you have to press continue first. Could someone help me?
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
I believe that you can use the command, game set next level to the same effect. Try using that followed by victory, show dialogs show scores. It should give you the option to quit the map before loading the next level.
 

magnemann

New Member
Reaction score
5
Problem moving a hero from a map to another

Oops, I was supposed to make an own thread about this. :p
 

magnemann

New Member
Reaction score
5
Hey, recently I asked around how to move a hero from one map to another one. I followed a guide (http://www.thehelper.net/forums/showthread.php?t=51668) and I have a problem; the hero won't appear on map 2!

Here are the triggers from map 1:

Trigger:
  • Cache
    • Events
    • Map initialization
    • Conditions
    • Actions
    • Game Cache - Create a game cache from Murloc Map 1.w3x
    • Set Cache = (Last created game cache)


Trigger:
  • Cache save
    • Events
    • Unit - A unit enters Region 016 &lt;gen&gt;
    • Conditions
    • (Triggering unit) Equal to Murloc Chieftain 0035 &lt;gen&gt;
    • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
    • Game Cache - Store Murloc Chieftain 0035 &lt;gen&gt; as Murkhil of Murlocs in Cache
    • Game Cache - Save Cache
    • Game - Set the next level to Maps\Murloc Map 2.w3x


Trigger from map 2:

Trigger:
  • Cache
    • Events
    • Map initialization
    • Conditions
    • Actions
    • Game Cache - Create a game cache from Murloc map 1.w3x
    • Set Cache = (Last created game cache)
    • Game Cache - Restore Murkhil of Murlocs from Cache for Player 1 (Red) at (Center of Region 000 &lt;gen&gt;) facing 135.00
    • Game Cache - Clear Cache
    • Game Cache - Save Cache


Can anyone spot what I've done wrong? I have no clue...
If you guys find it necessary for me to upload the maps, I'll do that.
+rep if you can help me!
 

Exide

I am amazingly focused right now!
Reaction score
448
Try this:
Trig5.jpg


EDIT: Notice that this trigger has no event. It will run because of another trigger.
 

Exide

I am amazingly focused right now!
Reaction score
448

magnemann

New Member
Reaction score
5
Jesus, I asked someone and they told me that the tutorial was about creating a game cache as another file with the w3v format, and that it had nothing to do with what I wanted!

So, the tutorial I was following was completely wrong. :(

Any links to a tutorial that works? (moving a hero from a map to another)
 

Fire-Wolf

S.P.D Smoke Pot Daily, Legalize It!
Reaction score
54
why not use aceharts save/load system? If they are both the same in both maps you can load ur unit in both maps.
 

Exide

I am amazingly focused right now!
Reaction score
448
Any links to a tutorial that works? (moving a hero from a map to another)

I already gave you a link to a tutorial, a map and the freaking trigger for moving a hero from one map to another. -What's the big problem?
 

magnemann

New Member
Reaction score
5
I already gave you a link to a tutorial, a map and the freaking trigger for moving a hero from one map to another. -What's the big problem?

There's no problem, it's just that I wanted to know what was wrong with my trigger and I didn't get an answer to that specific question, I'll check out your guide and post questions if there is something I don't get.

Just a quick question though, I saw it said Save or Load game FallenMonk.w3v
Is it supposed to be w3v? Aren't TFT maps .w3x?
 

magnemann

New Member
Reaction score
5
Dude, one thing I don't understand...

Trigger:
  • If (Hero Not equal to No unit) then do (skip remaining actions) else (do nothing)
    • Unit - Create 1 Fallen Monk for Player 1 (Red) at (Player 1 (Red) start location) facing 270.00 degrees.
    • Hero - Set (Last created unit) Hero-level to (Load Hero_Level of Map 1 from (Last created game cache)), Hide level-up graphics
    • Set Hero = (Last created unit)

How do I do that? You didn't explain that in the tutorial. How do I do the Hero Not Equal to No unit?
And how do I do the rest? Create 1 "fallen monk" (or in my case, murloc chieftain)? I'm confused now!

Just explain everything about the last trigger! Thoroughly, please.
 

Exide

I am amazingly focused right now!
Reaction score
448
Just a quick question though, I saw it said Save or Load game FallenMonk.w3v
Is it supposed to be w3v? Aren't TFT maps .w3x?

Yes, normal Frozen throne maps are .w3x.
I don't know why it's .w3v, it might have to do with it being a campaign map.


How do I do that? You didn't explain that in the tutorial. How do I do the Hero Not Equal to No unit?
And how do I do the rest? Create 1 "fallen monk" (or in my case, murloc chieftain)? I'm confused now!

Just explain everything about the last trigger! Thoroughly, please.


Trigger:
  • If (Hero Not equal to No unit) then do (skip remaining actions) else (do nothing)


Hero is a Unit Variable.
No unit is a 'Preset'. -Which means it's above both 'Function' ((Triggering Unit), (Killing Unit), Picked unit, etc), and 'Variable' (Such as 'Hero').

Examples:
You can do it like this:
Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit - Create 1 Mountain King for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Set Hero = (Last created unit)
      • -------- //Last created unit is a Function. --------

-This means that the Mountain King = Hero


Trigger:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Set Hero = No unit
      • -------- //No unit is a Preset. --------

-Setting the variable like this means that your variable forgets the unit. (Since it's no longer any specific unit.)


Trigger:
  • If (Hero Not equal to No unit) then do (skip remaining actions) else (do nothing)

Is If / Then / Else. -A very useful function that let's you check for a condition and then take actions accordingly.
In this case: If the variable Hero is "empty" (No unit), then it will create a 'Fallen Monk', and assign Hero as (Last created unit).
However, if it IS a unit then the trigger will 'skip remaining actions' - meaning nothing else will happen. (No unit will be created.)

In my trigger I used 'Fallen Monk' as an example. You should replace it with murloc chieftain.


How to set up a trigger like mine:
-Start by creating a new trigger.
-Add a trigger for restoring the saved hero. You do this by using Game Cache - Restore Unit Facing Angle, like this:
Trigger:
  • Game Cache - Restore Type_Your_Label_Here of Your_Category_Here from (Last created game cache) for Player 1 (Red) at (Center of (Playable map area)) facing 0.00

-You also need to change: (Last created game cache) so that it suits your map. The player who should own the unit. Where the unit should be spawned. And the facing angle. (270.0 = south.)

-Then add the next action: Game Cache - Reload All, like this:
Trigger:
  • Game Cache - Reload all game cache data from disk


-Then add the action: Set variable, like this:
Trigger:
  • Set Hero = (Last restored unit)

(This means that IF you restored a unit, it will now be known as 'Hero'. -So that you can use it later in this trigger, and in other triggers as well.)

-Now, we use our new variable to check if there actually IS a unit or not:
If / Then / Else -> Condition: Unit Comparison - Hero, Not Equal To, No unit -> Action: Skip remaining actions -> Else: Do nothing, like this:
Trigger:
  • If (Hero Not equal to No unit) then do (Skip remaining actions) else do (Do nothing)

Doing nothing, in this case, means that the trigger will continue to run. -Skipping remaining actions talks for itself. (Does the opposite.)

-Next is a simple Unit - Create Units Facing Angle, like so:
Trigger:
  • Unit - Create 1 Murloc Chieftain for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees


-If we failed to restore our hero, this newly created one will be level 1. So we must set it's level to ..Whatever it was when saving, in the last map.. We find that info in our Game cache, obviously.
Hero - Set Level + Game Cache - Load Integer Value;
Trigger:
  • Hero - Set (Last created unit) Hero-level to (Load Your_Label_Here of Your_Category_Here from (Last created game cache)), Hide level-up graphics


-Finally, we set out new unit as 'Hero' - in order to use it later on (for saving, and many other things). Set variable:
Trigger:
  • Set Hero = (Last created unit)


Your trigger should now look like this:
Trigger:
  • Actions
    • Game Cache - Restore Type_Your_Label_Here of Your_Category_Here from (Last created game cache) for Player 1 (Red) at (Center of (Playable map area)) facing 0.00
    • Game Cache - Reload all game cache data from disk
    • Set Hero = (Last restored unit)
    • If (Hero Not equal to No unit) then do (Skip remaining actions) else do (Do nothing)
    • Unit - Create 1 Murloc Chieftain for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
    • Hero - Set (Last created unit) Hero-level to (Load Your_Label_Here of Your_Category_Here from (Last created game cache)), Hide level-up graphics
    • Set Hero = (Last created unit)


-You obviously need to change "Your_Label_Here" and "Your_Category_Here" into ..Whatever it is that you call them.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top