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

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 :)
 
Level 7
Joined
Sep 9, 2007
Messages
253
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
 
Level 12
Joined
Mar 16, 2006
Messages
992
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.
 
Level 10
Joined
Jun 10, 2007
Messages
557
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...
 
Level 7
Joined
Sep 9, 2007
Messages
253
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.
Top