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

[Trigger] Buff Removal

Status
Not open for further replies.
Level 11
Joined
Nov 15, 2007
Messages
781
I need a way to periodically remove buffs from a unit, while leaving a single buff on the unit (which is the buff the buff-removing spell is based on). GUI or simple JASS preferred, thanks in advance.
 
Level 4
Joined
Feb 2, 2009
Messages
71
Hmm, I can't see any easy way of doing this. Maybe you could loop through the buffs somehow and destroy it if it's not the silencebuff.

Or maybe you can modify the spell so the buff is added after the buffs are removed?
 
Level 11
Joined
Nov 15, 2007
Messages
781
But it needs to remove buffs as close to their initial placement as possible. The only way I see of doing this right now is to periodically remove every buff individually that isn't the debuffing buff. Which is going to be a lot of buffs.

Edit: To clarify; a spell is cast, placing this buff, and for as long as the buff lasts all other buffs are removed from the effected unit. So it isn't just a one-time debuff.
 
Level 5
Joined
Oct 17, 2006
Messages
151
instead of keeping the old buff on instead you remove all buffs and then order a dummy to cast the spell again (make sure the spell doesn't have noise otherwise it would be weird with a random noise every couple of seconds... :grin:).

EDIT:Also have a separate variable based on the lasting time of this buff that will be used in another trigger where if integer = that time then remove your debuffing buff...
 
Last edited:
Level 5
Joined
Oct 17, 2006
Messages
151
I would recommend not doing specific buff because if you had 30 different spells that "might" be on the unit you would have to repeat the specific buff action 30 times so that you are removing for sure all buffs (hence you should do it my way... :cool:)
 
Level 11
Joined
Nov 15, 2007
Messages
781
"Remove Specific Buff" for every buff.

Sadly, probably my only option. The problem with creating a variable for duration and constantly re-casting the spell is this spell is meant to be spammed repeatedly on every possible unit, so there'd be a lot of issues with that. And also the spell is supposed to be counterable with an enemy who can dispel it, so it'd be annoying if it just got re-cast again after that.

If anyone knows of a better way I'm still open to suggestions, but I'm going to start adding a trigger to remove every buff in the game now just in case :sad:
 
Level 5
Joined
Oct 17, 2006
Messages
151
could you create a dummy with a gen timer who casts the spell?

So like:
Pick all units of (unit type= dummy) close to (the guy with this buff) in range of 2 <--- (so that it only selects the dummy and if the dummy isn't there then it can not cast it...)
order dummy to cast debuffing spell

This way you would have lots of dummies casting the spell instead of a variable storing the data.

And with countering it is easy.
Unit uses ability
Ability used equals countering spell
Kill dummy at point of ability being cast
remove debuffing buff (btw that buff is really just a show buff... the actual goodies is in the triggers)
 
Level 4
Joined
Feb 2, 2009
Messages
71
Hmm, isn't it any way to making the unit SpellImmune? That would partly solve the problem.
If you want the units to be affected by non-buff spells it's not an option though.
 
Level 11
Joined
Nov 15, 2007
Messages
781
If I wanted spell immunity I'd just use anti-magic shell. I'm resigned to my fate now, just tossed this out there in the off-chance that somebody could come up with something I hadn't considered. Thanks for trying though.
 
Status
Not open for further replies.
Top