• 🏆 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!

[Solved] Remove ability

Status
Not open for further replies.
Level 3
Joined
Jan 30, 2016
Messages
39
I've made a trigger that add unit ability after it become the target of specific ability.

But when I've made add to this trigger lines "wait 2 sec" "remove this ability from the targer of ability cast" nothing happend.

How can I remove ability?
 
Level 12
Joined
Jan 2, 2016
Messages
973
  • Custom script: local unit u = GetSpellTargetUnit()
  • Unit - Add ability ... to (Target of Ability Being Cast)
  • Wait - 2.00 seconds
  • Custom script: set udg_Temp_Unit = u
  • Unit - Remove ability .... from (Temp_Unit)
  • Custom script: set u = null
That would be the MUI way to do it.
Otherwise you could simply do:
  • Set Target_Unit = Target of Ability Being Cast
  • Unit - Add ability ... to (Target_Unit)
  • Wait - 2.00 seconds
  • Unit - Remove ability .... from (Target_Unit)
 
Level 3
Joined
Jan 30, 2016
Messages
39
I've made 4 triggers and 4 spelles. Each time I cast a spell one trigger turn off and other turn on circle-wise. But the part that should remove spells after 30 sec does not work.

 
Status
Not open for further replies.
Top