HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero limiting

07-05-2003, 02:48 AM#1
Dark_Lite
For some reason, custom heroes don't seem to follow the rules of 1 Hero per Level of Town hall. I guess it's probably a built-in failsafe feature of the game or something.

I have 4 heroes, all custom. I need them to follow the normal hero limits in the game. I'm sure this can be accomplished with triggers.. But I'm not sure how. If anyone can either give me a link on how to do it or just tell me how, it'd be appreciated ^_^
07-05-2003, 12:28 PM#2
DarkDevotion
Well, You can make it so that whenever a player controls 2 of the heroes.. remove the last created one and give back the gold and warn him.. after the first time he wont do it again.

Also there is a trigger from the Melee starting. that states, Restrict to all players 1 hero per hero type. That could probably work
07-05-2003, 01:00 PM#3
Dark_Lite
Quote:
Originally posted by DarkDevotion
Well, You can make it so that whenever a player controls 2 of the heroes.. remove the last created one and give back the gold and warn him.. after the first time he wont do it again.

Also there is a trigger from the Melee starting. that states, Restrict to all players 1 hero per hero type. That could probably work


That trigger only applies to regular heroes.
07-05-2003, 01:27 PM#4
leppy
i had this problem too, when i was makin a new race for a map... i dunno, make some triggers i guess. can you make heroes unbuildable after a variable becomes equal to 4 and set the variable to +1 when you make a hero? somethin like that, i don't think it can be done with normal map defaults though...
07-05-2003, 02:56 PM#5
Dark_Lite
Events
Unit - A unit enters (Playable map area)

Conditions
((Unit-type of (Triggering unit)) Equal to Naga Royal Guard (Hero)) or ((Unit-type of (Triggering unit)) Equal to Naga Sea Witch (Racial))
(Number of units in (Units in (Playable map area))) Equal to (NumberOfHeroesTeir1 + 1)

Actions
Unit - Kill (Triggering unit)

---------

This is the trigger I have set up now. I've tested it and it doesn't seem to work. Keep in mind this will have to eventually work for four heroes, but I'm only concerned about 2 right now..

Anyone know how to fix this? ^_^
07-05-2003, 04:13 PM#6
Raptor--
#1:

number of units in playable map area will count every unit including non heros and the building that they're being built from...

#2:

can't debug it for u if i don't know where NumberOfHeroesTier1 comes from
07-05-2003, 06:42 PM#7
Dark_Lite
It's just an integer set to 1.
07-05-2003, 07:05 PM#8
Raptor--
Quote:
(Number of units in (Units in (Playable map area))) Equal to (NumberOfHeroesTeir1 + 1)

well if u have more than 2 units (buildings, units, heros, anything) in the game, then it won't work

first u'd have to specifiy number of units that are heros, or are in a unit group that contains all heros, instead of saying all units in the game
07-06-2003, 05:46 PM#9
Dark_Lite
Alright I'll stick that in, I'll post the updated trigger when I have the time.
07-06-2003, 06:54 PM#10
Dinadan87
You can always simply have a trigger run whenever you train one of the heroes, and have it disable training of that hero after the first one is trained. Then you can't make any more, but you can still revive the one you have.

And if you have more than 3 heroes and you don't want them to get more than three, you can do a trigger like that or just use this action that came with TFT
Player - Limit Training of Heroes to 3 for player 1

Edit- Just noticed, right above the hero training limit action they have a unit-type limit action, so you can limit the player to 1 of any type of unit, including a hero.
07-08-2003, 10:13 PM#11
Trouveur
Yeah, we know already how to make only one heros of a particular type trainable. But we need to know how to link custom heroes with the tech tree requirements.
07-11-2003, 02:36 AM#12
Guest
I had this same problem. The solution can be found in the trigger comments from Blizzard's Monolith map. Go to a normal hero, say the Paladin, and add your custom heros into his Techtree Equivalents field. Apparently, this gives your custom heroes the HERO code which makes the default melee restriction trigger work. Hope this helped.