• 🏆 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] (Resolved) Trouble removing specific Buff

Level 2
Joined
Oct 11, 2020
Messages
7
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:
Top