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

How do i make it so you can have 1 hero? {in a Tavern system}

Status
Not open for further replies.
Level 2
Joined
Jul 8, 2008
Messages
16
Well.. you could always place that hero for the player, or are you asking how to add something like a custom unit so it is limited like normal heroes?
 
Level 3
Joined
May 17, 2005
Messages
30
I made a tavern and i didnt want a player taking like half the hero's but my question has alredy been answered :D
 
Level 12
Joined
Mar 10, 2008
Messages
869
That trigger, an easier way, comes in Melee Initialization but I'm not sure if it will work if its a custom map.
If helped please +Rep
Don't be a rep piggy, they will rep you if they want to...

By the way...
I'm not sure if that will work when its buying heroes in taverns instantly, if so I think you might have to make a tavern owned by each person and then make a trigger for when they train a hero, their shop disappears or make it when they buy a hero, teleport the hero out of reach of the tavern and kill the hero buyer.
 
Level 12
Joined
Aug 22, 2008
Messages
911
I'm not sure if that will work when its buying heroes in taverns instantly, if so I think you might have to make a tavern owned by each person and then make a trigger for when they train a hero, their shop disappears or make it when they buy a hero, teleport the hero out of reach of the tavern and kill the hero buyer.
It will, a player can't buy a hero if he doesn't have a free slot. Evidence stands that when in a melee map a player can't buy a fourth hero.
 
Level 11
Joined
Jun 28, 2008
Messages
2,362
If its a custom map (not melee), and scenario is like a AoS or on ORPG, just limit pop. Give a player just 5 population, and make every hero cost only 5 population. Then each player can have only 1 hero.

But if you want the player can have mercenaries, then deside witch is the max number of mercenaries. I will take 10. Then simply give each player 25 population. Make each hero cost 15 population, and each mercenary, that you can buy later, 1 population.

You can give population by giving each player a circle of power infront of taverns on witch a player buys heroes. And in same time you get a herobuyer.

If your wondering about a custom hero witch can be bought many times, you have to go to advanced options and make cpu see it as a hero not as a unit. I dont remember the path.
 
Level 9
Joined
Aug 1, 2008
Messages
453
Also if you want to add a re pick system to your map and you use that way, you'll need to remove the players hero and increase the maximum about of heroes they have. EX) A person's maximum was 1 and they re pick, they couldn't get another hero in less you increase the maximum of heroes they can to 2. best way to do this a integer array.

EDIT: Also it doesn't remove their tavern it just doesn't show any heroes that can be trained for that player.
 
Level 5
Joined
Apr 22, 2008
Messages
139
easiest way, like HailFireer said: in the top of the editor go to advanced: gameplay constants, check "use custom gameplay constants" go most of the way down, and add your hero to the list of heroes in the "dependancy equivelants -hero" under techtree
thats how the normal heroes are limited

EDIT: o wait nvm thats not what you were asking. my bad
 
Status
Not open for further replies.
Top