• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

About "Unit-Remove Ability"

Status
Not open for further replies.
Level 3
Joined
Oct 8, 2007
Messages
41
I was wondering what does the "Unit-Remove Ability" trigger do? I tried it a few times but doesnt seem to work. Does it remove the ability only if the ability is a item ability or a unit ability? Or must it be a hero ability or only certain abilities can be removed?
 
Level 2
Joined
Oct 7, 2007
Messages
19
in the condition did you put what ability is to be removed? and what's the event causing the ability to be removed?
 
Level 3
Joined
Oct 8, 2007
Messages
41
  • My Ability
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to My Ability
    • Actions
      • Unit - Add +20 damage (+20) to (Target unit of ability being cast)
      • Unit - Add life ability(Lesser) to (Target unit of ability being cast)
      • Wait 30.00 seconds
      • Unit - Remove +20 damage (+20) from (Target unit of ability being cast)
      • Unit - Remove life ability(Lesser) from (Target unit of ability being cast)
should this work?
 
Level 3
Joined
Oct 8, 2007
Messages
41
thanks for your help
i think i solved it by setting the (Target unit of ability being cast) to a variable

  • My Ability
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Giant Growth
    • Actions
      • Set g = (Target unit of ability being cast)
      • Unit - Add +20 damage (+20) to g
      • Unit - Add life ability(Lesser) to g
      • Wait 30.00 seconds
      • Unit - Remove +20 damage (+20) from g
      • Unit - Remove life ability(Lesser) from g

it worked
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
problem is when someone else casts this ability damage bonus of first caster never ends
In this point I would like to suggest you to use locals but you'll need jass for it
I'll tell ya what convert it to custom text
and add "local unit caster" to under "function Trig_My_Ability_Actions takes nothing returns nothing"
And replace "udg_g"s with "caster" (exclude nails)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Or he can just do this, Need_O2:

  • My Ability
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Giant Growth
    • Actions
      • Custom script: local unit udg_g
      • Set g = (Target unit of ability being cast)
      • Unit - Add +20 damage (+20) to g
      • Unit - Add life ability(Lesser) to g
      • Wait 30.00 seconds
      • Unit - Remove +20 damage (+20) from g
      • Unit - Remove life ability(Lesser) from g
      • Set g = No Unit
 
Level 3
Joined
Oct 8, 2007
Messages
41
Or he can just do this, Need_O2:

  • My Ability
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Giant Growth
    • Actions
      • Custom script: local unit udg_g
      • Set g = (Target unit of ability being cast)
      • Unit - Add +20 damage (+20) to g
      • Unit - Add life ability(Lesser) to g
      • Wait 30.00 seconds
      • Unit - Remove +20 damage (+20) from g
      • Unit - Remove life ability(Lesser) from g
      • Set g = No Unit

oh yeah thanks to Need_O2 for telling me theres a bug and it would cause the buff to last forever.

Purple, i dont really understand how your trigger solves the problem. A bit of explanation please?
 
Status
Not open for further replies.
Top