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

Hero Help {building up a tavern system with 5 heroes}

Status
Not open for further replies.
Level 3
Joined
May 8, 2008
Messages
38
Hey I'm new to mapping, just wondering how I'd go about adding Heroes to my map. I basically want taverns and (for now) be able to pick between like 5 or so heroes. I really don't know how to approach this.

I don't know JASS or variables in triggers very well, but if you could give me a quick explanation that would help. If I need to give you any more info, lemme know.

Thanks!
 
Level 18
Joined
Mar 7, 2005
Messages
824
uhm you don't need any trigger for this.. it's just a bit within the object editor of the WE..

First create your Heroes, right-click on a unit listed to the left and a new window will popup, you can choose a unit that you're hero could be based on, doesn't matter what unit (should be a hero, though) and then give it a name and press ok..

Now you got a new custom Unit, a new Hero, just edit the parts you like to.. HP, Stats gain per Lvl, etc.. after this you can go on and create more Heroes like the same way..

After that create again a new unit, but now go to the buildings part (the lower part of the popped up window) and search for the tavern, it's easier to edit it than.. after selecting it (it's under neutral units in the dropdown menu) and clicking OK you only have to change the heroes it should contain.. scroll a bit there are already some listed.. remove all and add your newly created Heroes..

After all you only have to place the tavern on your map and you're done =)
 
Level 3
Joined
May 8, 2008
Messages
38
uhm you don't need any trigger for this.. it's just a bit within the object editor of the WE..

First create your Heroes, right-click on a unit listed to the left and a new window will popup, you can choose a unit that you're hero could be based on, doesn't matter what unit (should be a hero, though) and then give it a name and press ok..

Now you got a new custom Unit, a new Hero, just edit the parts you like to.. HP, Stats gain per Lvl, etc.. after this you can go on and create more Heroes like the same way..

After that create again a new unit, but now go to the buildings part (the lower part of the popped up window) and search for the tavern, it's easier to edit it than.. after selecting it (it's under neutral units in the dropdown menu) and clicking OK you only have to change the heroes it should contain.. scroll a bit there are already some listed.. remove all and add your newly created Heroes..

After all you only have to place the tavern on your map and you're done =)

Oh, whole lot easier than I thought. Thanks!

One more question. If I have a central point for a tavern, what trigger should I use to place the newly picked Hero at the corresponding player's base? It doesn't make a lot of sense for all the heroes to spawn next to the tavern.
 
Last edited:
Level 2
Joined
Mar 7, 2005
Messages
23
hey..

u need to detect what player is picking a hero form ur tavern .

make a trigger .
  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Selling unit) Equal to Select_Your_tavern <gen>
    • Actions
      • If ((Owner of (Sold unit)) Equal to Player 1 (Red)) then do (Unit - Move (Sold unit) instantly to (Center of Player_1_base_region <gen>)) else do (Do nothing)
      • If ((Owner of (Sold unit)) Equal to Player 2 (blue)) then do (Unit - Move (Sold unit) instantly to (Center of Player_2_base_region <gen>)) else do (Do nothing)
u need to create a region at the place u want to see ur hero for player 1 if player 1 picked that hero.

i hope its what u r asking :)
 
Last edited:
Level 3
Joined
May 8, 2008
Messages
38
hey..

u need to detect what player is picking a hero form ur tavern .

make a trigger .
  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Selling unit) Equal to Select_Your_tavern <gen>
    • Actions
      • If ((Owner of (Sold unit)) Equal to Player 1 (Red)) then do (Unit - Move (Sold unit) instantly to (Center of Your_Player_one_base_region <gen>)) else do (Do nothing)
u need to create a region at the place u want to see ur hero for player 1 if player 1 picked that hero.

i hope its what u r asking :)

Worked great. Thanks :D +rep
 
Level 2
Joined
Mar 7, 2005
Messages
23
hehe ty . btw if u want to enchant it and show hero revive special effect when u picked a hero .. or pan ur game camera to ur player base ( to see the hero ) u can replace trigger by this 1 :

  • Untitled Trigger 001
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Selling unit) Equal to Select_Your_tavern <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Sold unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Unit - Move (Sold unit) instantly to (Center of Player_1_base_region <gen>)
          • Special Effect - Create a special effect attached to the origin of (Sold unit) using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
          • Camera - Pan camera for (Owner of (Sold unit)) to (Center of Player_1_base_region <gen>) over 0.00 seconds
    • Else - Actions
cheer
 
Status
Not open for further replies.
Top