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

regions in map issue

Status
Not open for further replies.
Level 6
Joined
Aug 27, 2013
Messages
103
I have two heroes on the map, how can I transfer them both. I tried with set variable hero1 and hero2 instead entering unit, but game crashes when I enter region. How can I do it? It works fine for 1 hero.

  • Go to Map 2
    • Events
      • Unit - A unit enters Region 015 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Set LeftFromMap = 1
      • Game Cache - Clear all labels of Units in CommonCache
      • Game Cache - Store (Entering unit) as Hero of Units in CommonCache
      • Game Cache - Store (Life of (Entering unit)) as HeroLife of Units in CommonCache
      • Game Cache - Store (Mana of (Entering unit)) as HeroMana of Units in CommonCache
      • Game Cache - Store LeftFromMap as LeftFromMap of Variables in CommonCache
      • Game Cache - Store Map2NewGame as Map2NewGame of Variables in CommonCache
      • Game Cache - Store Map3NewGame as Map3NewGame of Variables in CommonCache
      • Game Cache - Save CommonCache
      • Unit - Remove (Entering unit) from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Map2NewGame Equal to True
        • Then - Actions
          • Game - Save game as Saves\tuskarr2.w3x and change level to tuskarr2-1.w3x (Skip scores)
        • Else - Actions
          • Game - Save game as Saves\tuskarr2.w3x and change level to tuskarr2-1.w3x (Skip scores)
 
Level 18
Joined
Mar 16, 2008
Messages
721
I think if you move a unit that does not exists, it crashes the game. Are you sure this isn't the problem? It might apply to dead units too but I think those still exist as a corpse, maybe not for heroes?
 
Status
Not open for further replies.
Top