• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

cumulative stacking buffs

Status
Not open for further replies.
Level 7
Joined
Sep 9, 2007
Messages
253
Such as Viscous Nasal Goo in DotA
Such as Shadow Vulnerability or Sunder Armour in WoW

I will use some arbitrary numbers to help describe what i want to do.


My hero has two abilities:
Curse of Corruption(single targetted) - adds a 5 second debuff to an enemy slowing its attack speed, this debuff should be stackable so as to slow the attack cumulatively.
Tainted Blades (passive) - chance on attack to apply or stack the same debuff as in the above ability.


so you can see the hero has two ways of adding and stacking this debuff which should stack up to 5 times slowing the attack speed by 10% per stack.


What I would really like the spell to do is for each subsequent application of the debuff to refresh the duration just like sunder armour or shadow vulnerability in world of warcraft. IE, if the debuff only has 1 second left but a second stack is applied this will mean a 20% attack speed reduction for 5 more seconds, even though the enemy has already suffered a 10% attack speed reduction for 4 seconds.

I have a reasonably comprehensive knowledge of triggered so feel free to give me complex instructions :)
 
This aught to do the trick.

The tainted blades trigger is bugged a little bit, I can't seem to figure out why. It seems to resolve to the first buff a second after the stacked buff is cast, but the stacked buffs still cumulate. maybe you can figure out what's wrong.
 

Attachments

Thanks, now that I've seen how that system works I think I can create my own without too much trouble. Thanks again.


Just out of curiosity... Why do you use a point variable and set it to a position instead of just referring to the position in the trigger response?

instead of this....

Set temppoint = (Position of (Target unit of ability being cast))
Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at temppoint facing Default building facing degrees

why not just do this?

Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
 
Points leak, so you must assign it to a variable and destroy it. Enough leaks will cause major slowdowns or crashes.

I would just use a dummy spell and buff checker trigger to do it.
 
Yeah, when you use variables and refer to them it prevents a memory leak. Memory leaks are like empty husks that do nothing but take up space and lag the map (in game, of course) and can't be referred to. One memory leak isn't a big deal, but, say, ten thousand memory leaks...
 
I see, this is something I need to get a handle on, my map has many triggered abilities like this which create a dummy unit at a point but I wasn't aware each point that gets referred to is then stored. I'll now replace this in all my triggered abilities, thanks.
 
Status
Not open for further replies.
Back
Top