• 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.

[Solved] Need help with this ability idea

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2011
Messages
226
Im making a map for fun with a set of heros and i need help making this idea come to life because i've failed to.

I want to make an ultimate spell for an agility hero that is a blink type spell but i want it to also damage a random enemy unit in a small 300 AoE around him (after he blinks). Im a rookie thanks for feedback.
 
  • Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • Actions
      • Set Point = (Target point of ability being cast)
      • Set Group = (Units within 300.00 of Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True))))
      • Set Target = (Random unit from Group)
      • Unit - Cause (Triggering unit) to damage Target, dealing 100.00 damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation (udg_Point)
      • Custom script: call DestroyGroup (udg_Group)
References:
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
 
Level 4
Joined
Sep 22, 2011
Messages
70
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
 
Status
Not open for further replies.
Top