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

[Trigger] Removing a buff from a spell-hit unit

Status
Not open for further replies.
Level 11
Joined
Feb 11, 2010
Messages
199
It seems i can't find this anywere so i'm posting.
I'd like to remove a buff from an unit hit by(example) a slow spell. How's the GUI sequence? Thanks in advance.

There is, in fact, a trigger called "Unit - Remove Specific Buff." Use that for whatever unit you want to remove the buff from.

In fact, there's at least 3 different "Unit - Remove buffs" functions in GUI. They're not hidden anywhere... just scroll down the list of Unit Actions.

  • Unit - Remove (category) buffs from (Unit)
  • Unit - Remove (category) buffs considered (Magical and/or Physical) from (Unit) (Include/Exclude expiration timers, Include/Exclude auras)
  • Unit - Remove (specific buff type) buff from (Unit)
:thumbs_up:
 
Level 11
Joined
Feb 11, 2010
Messages
199
I know that, i already used that type of action. The problem is that i may be wrong at event or conditions. Can you explain me which event/condition to use?

Well, if you want to have a unit *hit by an ability* have a buff removed, it would be...

  • RemoveBuff
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your Spell)
    • Actions
      • Unit - Remove (Your Specifc Buff) from (Event Response - Target Unit of Ability Being Cast)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
The game won't remember "target unit of ability being cast" if you use wait.

Here's how to do it:

  • immunity
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Slow
      • (Unit-type of (Target unit of ability being cast)) Equal to Footman
    • Actions
      • Custom script: local unit u = GetSpellTargetUnit()
      • Wait 1.00 seconds
      • Custom script: call UnitRemoveBuffBJ( 'Bslo', u )
 

Attachments

  • testslowspell.w3x
    16.7 KB · Views: 55
Status
Not open for further replies.
Top