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

Moving a unit through two maps with the same coordinates

Status
Not open for further replies.
Hello, I would like to ask if it is possible to move a hero to another map (this is not a campaign, I am talking about two maps placed at the same folder in Warcraft III maps folder) with his current coordinates in the current map. Also it is possible to transfer the variables to another map? (I want to transfer the item variables/inventory as well as the unit stats to another map aswell). I know it can be done with the campaign easily, but I can't seem to load the map properly when it is just a map loading another map at the same directory.

I will really appreciate a help especially with the triggers if you have some spare time. :)

If you're curious what I am trying to achieve is that I want my map to have some sort of underground, when he enters this region, the other map will load (with the same size as the first map), and the hero will spawn at the same coordinates where it is at the first map.
 
Switching maps, so you mean offline, right? You might use GameCache, to store data offline, and to load it again. I made an example to to restore level, items, and hero position from Map1 to Map2 with game cache. Feel free to ask.

In Map1 hit 'Esc' button to update/save game cache.
In Map2 hit 'Esc' button to load from game cache.
 

Attachments

  • Map 1.w3x
    14.1 KB · Views: 23
  • Map 2.w3x
    14.2 KB · Views: 25
Offline yes. I still have trouble loading Map B when you're actively playing Map A. Your item transfer works great by the way, I'm glad you made it easier to understand aswell because I did'nt understand the tutorials I've read about Game Caches.

  • Load Another Map
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Game - Save game as SaveFile.w3z and change level to Map 2.w3x (Skip scores)
The maps are both at the same directory and it still doesn't work. Do I have to make my project a campaign instead of a map in order to use this function (Game - Save game as <> and change level to <>.w3x (Skip scores))?
 
The maps are both at the same directory and it still doesn't work. Do I have to make my project a campaign instead of a map in order to use this function (Game - Save game as <> and change level to <>.w3x (Skip scores))?
Yes, I'm afraid campaign is the only way to change maps back and forth. I'm glad it helped, gl with your project. :)
 
It always worked before though, so why wouldn't it work now?

Yes I know it does work - when using it in a campaign, but what I am trying to do is loading a map without using the campaign editor (I am trying to load another map at the same directory where the active map is). I guess I'll have to convert my map to a campaign because what I am trying to do doesn't work.
 
Last edited:
Status
Not open for further replies.
Top