Spell base: Night Elf Blink ability
-
Blink AoE Damage
-
Events
-
Unit - A unit finishes casting an ability
-
Conditions
-
Ability - Ability beging cast Equal to YourBlinkSpellName
-
Actions
-
Set BlinkTarget_Loc = (Target point of ability being cast)
-
Set TargetUnits = (Units within 300.00 of BlinkTarget_Loc matching (((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
-
Unit - Cause (Triggering unit) to damage (Random unit from TargetUnits), dealing <Damage of Spell Here> damage of attack type Spells and damage type Normal
-
Custom script - call RemoveLocation(udg_BlinkTarget_Loc)
-
Custom script - call DestroyGroup(udg_TargetUnits)
Explination of Trigger Below!
~~~Since you said you'r a rookie I will provide a explination of everything to do with this trigger to make the spell work properly.
First off, you will be giving your hero the Blink spell, which is obvious. The part of the condition that reads "YourBlinkSpellNameHere", replace that with the name of the ability your using, IE if you havent changed the name, you should use Blink You will find this in the drop down list of abilities when you are setting up the condition, if you copy/paste or use a custom spell based off the Night Elf Blink spell, be sure to choose the menu "Custom" where it normally says "All". (to make it easier to find the correct spell, I always just make a new spell based off the one I want to use)
when you go to the actions
-
Set - BlinkTarget_Loc
and
-
Set - TargetUnits
You will click on the red word Variable, you will want to click Edit Variables in the box that pops up, click New Variable.
Make BlinkTarget_Loc a POINT variable, and TargetUnits a UNIT GROUP variable.
the action to set the units health:
-
Unit - Cause (Triggering unit) to damage (Random unit from TargetUnits), dealing <Damage of Spell Here> damage of attack type Spells and damage type Normal
Fiarly self-explanitory, will cause the hero to damage the randomly selected unit for the damage you want it to
The two "Custom script" lines are to remove the memory leaks from the two variables we used.
If you want the blink ability to do say.. 500damage, and the name of the ability is simply "Blink" the trigger shoudl look like:
-
Blink AoE Damage
-
Events
-
Unit - A unit finishes casting an ability
-
Conditions
-
Ability - Ability beging cast Equal to Blink
-
Actions
-
Set BlinkTarget_Loc = (Target point of ability being cast)
-
Set TargetUnits = (Units within 300.00 of BlinkTarget_Loc matching (((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
-
Unit - Cause (Triggering unit) to damage (Random unit from TargetUnits), dealing 500.00 damage of attack type Spells and damage type Normal
-
Custom script - call RemoveLocation(udg_BlinkTarget_Loc)
-
Custom script - call DestroyGroup(udg_TargetUnits)
This trigger will select a random unit within 300AoE of the target of the blink ability(which is where the hero will be after he uses the spell) and will cause the hero to damage them for 500damage