HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Aura that gives life to its bearer

01-05-2006, 03:46 PM#1
Belphegor666
I was wondering is there a way so that when a unit dies off certain aura the Hero with aura. For example if a unit dies under the effect of Death Aura the hero(owner of aura) gets 10/20/30/40% of dying units life?!
01-05-2006, 03:56 PM#2
noctune
Trigger:
Untitled Trigger 001
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Triggering unit) has buff Unholy Aura) Equal to True
Collapse Actions
Unit - Set life of (Killing unit) to ((Life of (Killing unit)) + (((Real((Level of Unholy Aura for (Killing unit)))) x 0.10) x (Max life of (Triggering unit))))

Well, I used Unholy Aura as an example.
I think that using Event Response - Killing Unit causes a leak, so you should store the Killing unit in a variable and them remove it.

Oh, and this triggers works for units killed under the effect of the aura, not ONLY by the aura.

Hope it helped.
01-05-2006, 04:30 PM#3
Earth-Fury
killing unti causes no leak as far as i know. (its a unit, not a unit group.)

and that will only work if the hero kills the unit.
01-05-2006, 04:54 PM#4
noctune
Quote:
Originally Posted by Earth-Fury
and that will only work if the hero kills the unit.

Really? The trigger just detects if a dying unit has a buff, i don't see how it would only work if the hero kills the unit.
Anyway, that's just a poor sample to help Belphegor make his own trigger.

Well, you could make it check if a dying unit is within a set range from the hero. And then increase the heroes's HP according to the level of his aura.
01-05-2006, 05:39 PM#5
Belphegor666
The real problem with this would be multicastability, seeing how you can't have a trigger if unit enters in range of multi units. Maybe a array would do the trick, though I heavily doubt it. It was pretty much as I expected...
01-05-2006, 05:42 PM#6
Chuckle_Brother
That code doesn't work. You can't detect buffs on dead units.
01-05-2006, 05:50 PM#7
Vexorian
Quote:
I think that using Event Response - Killing Unit causes a leak, so you should store the Killing unit in a variable and them remove it.

That's not true. After decay time the unit is removed automatically
01-05-2006, 06:00 PM#8
JeffreyQ
I am not quite sure about this. But if buffs are not available for dead units, try adding 1 more option to "Stats - Targets Allowed: Dead". Try giving it "Alive" also, just incase it only work for dead units.
01-05-2006, 07:09 PM#9
Immoralis
Quote:
Originally Posted by noctune
Trigger:
Untitled Trigger 001
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Triggering unit) has buff Unholy Aura) Equal to True
Collapse Actions
Unit - Set life of (Killing unit) to ((Life of (Killing unit)) + (((Real((Level of Unholy Aura for (Killing unit)))) x 0.10) x (Max life of (Triggering unit))))


Excellent trigger noctune, but instead of Triggering unit, use dying unit.
Also if that does not work because you cannot detect the buff on the unit because it is dead for any reason, you could always pick every unit in aura range and then use picked unit. This would work because units stay around after they die.
01-05-2006, 07:33 PM#10
Thunder_Eye
I dont see whats so great with it, It will only work if the hero kills the unit and if I understood right he wants it so any unit can kill it. But maybe Im wrong :P
01-05-2006, 07:40 PM#11
Belphegor666
Quote:
Originally Posted by Immoralis
Excellent trigger noctune, but instead of Triggering unit, use dying unit.
Also if that does not work because you cannot detect the buff on the unit because it is dead for any reason, you could always pick every unit in aura range and then use picked unit. This would work because units stay around after they die.

The problem with that it aint multicastable then. I mean how does the trigger know which hero has the ability and to whom to give the dead units life?

PS. Credits and rep to anyone that solves this one
01-05-2006, 07:48 PM#12
noctune
Trigger:
Untitled Trigger 001
Collapse Events
Unit - A unit Dies
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units within 300.00 of (Position of (Triggering unit)) matching ((Level of Unholy Aura for (Matching unit)) Greater than 0)) and do (Actions)
Collapse Loop - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((0.10 x (Real((Level of Unholy Aura for (Picked unit))))) x (Life of (Triggering unit))))

Check this trigger out.
I'm not really sure it's gonna work since i'm in a hurry here.
I'll be back in a few hours

Good luck.
01-05-2006, 08:17 PM#13
Belphegor666
Trigger:
Spell
Collapse Events
Unit - A unit Dies
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units within 500.00 of (Position of (Dying unit)) matching ((Level of Unholy Aura for (Picked unit)) Greater than 0)) and do (Actions)
Collapse Loop - Actions
Special Effect - Create a special effect at (Position of (Matching unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
I even tried a different verison to see atleast what unit does it picks and still nothing
01-05-2006, 08:39 PM#14
Immoralis
That trigger you just posted is jibberish.
Quote:
Unit Group - Pick every unit in (Units within 500.00 of (Position of (Dying unit)) matching ((Level of Unholy Aura for (Picked unit)) Greater than 0)) and do (Actions)

That does not work because it is looking for other units that have unholy aura, it also does not work because picked unit is supposed to be matching unit.

Here is how it should be:

Trigger:
Untitled Trigger 001
Collapse Events
Unit - A unit Dies
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units within 500.00 of (Position of (Dying unit)) matching ((Unit-type of (Matching unit)) Equal to Death Knight)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Picked unit)) Equal to (Owner of (Killing unit))
Collapse Then - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Life of (Dying unit)) x ((Real((Level of Unholy Aura for (Picked unit)))) x 0.10)))
Else - Actions
01-05-2006, 08:56 PM#15
ShadowDragon
Belphegor, your trigger should work when you change the picked unit to matching unit as stated by the above poster.

@Immoralis: If you read above, you would see that buffs cannot be detected on dead units. Your trigger will not work.

Oh, dash cunning. Way to edit it out.