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

Thorns spell

Status
Not open for further replies.
Level 3
Joined
Sep 3, 2007
Messages
30
Hey, i was wondering how do you make it so that Thorns can affect Ranged units too?
 
Level 3
Joined
Sep 3, 2007
Messages
30
I do not think you can.
Check some of the data options like game play constants if anything it will be in there if not in the object editor.

i mean like in DotA where you take damage when you attack Centaur Warchief from his spell "Return"
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
It is triggered.
A unit is attacked event, checking level of ability of attacked unit. Then damaging the attacking unit.
Nothing special ;)
And yes it damages you before you shoot :D
 
Level 3
Joined
Sep 3, 2007
Messages
30
It is triggered.
A unit is attacked event, checking level of ability of attacked unit. Then damaging the attacking unit.
Nothing special ;)
And yes it damages you before you shoot :D

sounds nice, how do i get "checking level of ability of attacked unit" in trigger editor under conditions? and "Then damaging the attacking unit" under actions? lol sorry im a trigger noob
 
Its an integer
  • Return
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Centaur
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Return for (Attacked unit)) Equal to 0
        • Then - Actions
          • Do nothing
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Return for (Attacked unit)) Greater than 0
        • Then - Actions
          • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing (5.00 x (Real((Level of Return for (Attacked unit))))) damage of attack type Spells and damage type Normal
        • Else - Actions
 
Level 29
Joined
Jul 29, 2007
Messages
5,174

This will fail.
First of all you do not need Do Nothing (you guys just never get that, do you ?), and the second thing - you do need even need the first if statement.

Instead of your main condition (unit type) change that to "level of x greater then 0".

  • bla bla
    • unit gets attacked bla bla
    • level of ability x is greater then 0 bla bla
    • dmg bla bla
 
Level 3
Joined
Sep 3, 2007
Messages
30
Its an integer
  • Return
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Centaur
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Return for (Attacked unit)) Equal to 0
        • Then - Actions
          • Do nothing
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Return for (Attacked unit)) Greater than 0
        • Then - Actions
          • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing (5.00 x (Real((Level of Return for (Attacked unit))))) damage of attack type Spells and damage type Normal
        • Else - Actions

thanks but how do i make it into a item ability? it only works for a unit ability as in trigger "Centaur"
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
you can make ranged units attack normal so they will attack from a range but it will act like meele attack (but they will be included in vampric aura too)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
  • Return
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Return for (Attacked unit)) Greater than 0
    • Actions
      • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing (5.00 x (Real((Level of Return for (Attacked unit))))) damage of attack type Spells and damage type Normal
This will do...
 
Level 3
Joined
Sep 3, 2007
Messages
30
how do you get (5.00 x (Real((Level of Return for (Attacked unit))))) under Actions?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
He asked for "Return" from Dota.
Here it is.
To prevent the abusing an attack detection engine would be required.
There is one here
 
Status
Not open for further replies.
Top