• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Limited heroes per map (need a bit help with this)

Status
Not open for further replies.
Level 2
Joined
Jul 8, 2004
Messages
16
Hello friends,

I have a problem with heroes on my map. I got custom heroes.. and i can't do the "limit 1 hero per player" thing. I got the trigger.. i have not even touched the "base" triggers. So why is this not working?

First of all they cost 450 .. you don't get a free one from the beggining. Second of all you can buy how many you want.. and this destroys the whole map. If anyone know a solution for this i would be very happy :D

Thank you for your time.
 
Level 2
Joined
Jul 9, 2004
Messages
12
sneaky fix

there is another way to do this (I think) but this is the first one that pops into my head:

Create a building with an identical name, stats, description, appeareance, etc... as the one that trains the heros, but do not give it any availible heros.

Then, make a trigger with the event "A unit finishes training", and the condition:

Code:
Or (Multiple Conditions)-
 unit type of (Trained Unit) = Hero1
 unit type of (Trained Unit) = Hero1
 unit type of (Trained Unit) = Hero1
 unit type of (Trained Unit) = Hero1
 ...

this will make the trigger run when a unit finishes training, and only if the unit that is trained is one of your heros.

for the action section, simply use the unit- replace command to replace the altar of kings (or whatever you use to train heros) with the duplicate you made before.

so, when you train a unit, if it is a hero, then the altar is replaced with an identical copy of itself that cannot train (but can revive) heros.

hope this works and good luck.[/b]
 

c3o

c3o

Level 2
Joined
Feb 17, 2004
Messages
21
Do the "Player - Limit training for [Your Hero] to [one] for player [Your player(s)]". But I don't really know how to make so the first hero costs 0 gold/wood :/.
 
Status
Not open for further replies.
Top