HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Add ability to heros for player?

06-16-2005, 05:01 AM#1
The_AwaKening
I need a trigger to add a custom ability to all heros of a triggering player. Basically a player purchases their 5th hero, and the number of heros they have is = to 5 exactly. The five heros have to be all NE plus alchemist or naga. Then ability 'A036' is added to all five heros.

I can't seem to find anything condition related to check this. I also can't find an action to give an ability to a certain type of hero matching triggering player. Is this possible without too much work?
06-16-2005, 08:22 AM#2
Scyze
Quote:
Originally Posted by The_AwaKening
I need a trigger to add a custom ability to all heros of a triggering player. Basically a player purchases their 5th hero, and the number of heros they have is = to 5 exactly. The five heros have to be all NE plus alchemist or naga. Then ability 'A036' is added to all five heros.

I can't seem to find anything condition related to check this. I also can't find an action to give an ability to a certain type of hero matching triggering player. Is this possible without too much work?
The only way I see it is that you would have to individually choose which heroes can trigger it. In order for me to better understand your problem, could you explain how/why you want this to happen? Because it's not making terribly much sense. But what I can suggest is this, roughly:
Select All Units Matching Conditions (Or, Multiple Conditions (if there is one? if not, use a lengthy multitude of 'and's and 'or's)),

If ((Number of units in unit group (Selected Units)) = 5),
Then
Add Ability A03 to Selected Units
Else
Do Nothing

The event should also be a periodic timer, but you probably know that.

- Scyze
06-16-2005, 09:04 AM#3
The_AwaKening
It's basically a bonus 15 dmg for all heros. The bonus is given because they chose all heros of the same race (racial bonus), plus 1 neautral. The map is a multi hero where you can choose any race.

I figure game cache would work, but I'm not too good with it. I got the part of player has 5 units, but can't find condition for hero types. Wondering if there is one?
06-16-2005, 09:20 AM#4
Anitarf
Use a unit-type comparison. Heroes are units, after all, as are buildings.
06-24-2005, 01:50 PM#5
volatile
first set your trigger to act upon player "purchasing" a unit

Event
Player purchases Hero (unit) whatever
Condition
Action
If heros controlled by player = 5 and are in group "night elf group" then
give all heroes ability.

I'm not sure of the exact trigger, but it seems fairly simple.