• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[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