• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] (Resolved) Trouble removing specific Buff

Level 2
Oct 11, 2020
Hello, I'm working on an ability with which I'm having some issues.

Essentially, when you attack a unit you apply a buff on them. Attacking the same unit again shall increment a value of x up to 10 stacks, where for each stack you gain bonus damage. When you change targets however, x goes back down to 0 and the buff from the original target is removed.

I managed to pull off the bonus damage stacks(albeit very finicky), however I'm having trouble with the buff removal.

Right now I've set the attacked target to a variable. If the target has the buff, start incrementing. If the target does not have the buff, remove the buff from the variable unit.
The last part I tried doing using Unit Groups. Since I'm using only 1 variable for the attacked unit and that unit changes when I attack a new unit, I tried using Unit Groups. Where whenever the effect triggers, select all units from the playable map area, remove Variable Unit from that group, Remove chosen buff from picked units (still doesn't work).

Can anybody help out? I'm using GUI btw

Edit: issue resolved. I simply wasn't using Unit Groups properly. Thread can be closed
Last edited: