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

Can Buff Stacks?

Status
Not open for further replies.
Level 4
Joined
Feb 27, 2008
Messages
71
Hey guys =)
Does anyone know how to stack buff? I have heard that is possible =)
You dont understand what i mean?
Let's say you got 2 spells
Both based on Shadowstrike
Both with different buffs
If you cast spell A on the target
It shows buff A
But if you then cast spell B on the target while buff A is still on it
Buff A will be replaced by buff B
Get it =)?
Would be very happy if someone know how to do it =)

and one more thing =P Does someone know how to make the spell mind flay (from wow) in jass? :grin:
 
Level 13
Joined
Jul 26, 2008
Messages
1,009
Doesn't sound too hard. Just do this:

If Unit Casts Ability A, then:
Remove Specific Buff From Target Unit of Ability. Specific Buff = Buff of Ability B.

However, if you want the spell effects of both spells to be active at the same time, that may require Trigger Enhanced spells, which will require you to research said tutorial.
 
Level 13
Joined
Jul 26, 2008
Messages
1,009
Under Events, it's generic unit event, Unit starts the affect of an ability.

Under Conditions, you do Ability Comparison.

Ability being cast = Ability you want to overwrite the buff of the other ability.

Action is Unit - Remove Specific Buff from Event Response - Target Unit of Ability

You just input the proper things yourself. I've told you where to go but I can't tell you what to name your spells and what buffs to create, that's up to you, and you fill in those blanks there with what you've created.


Once again, you may be wanting to do more than remove buffs, so you'll like want to go through the GUI and Jass tutorials here (Your preference) and read up on GUI Spells, Trigger Enhanced Spells, anything with spells under the GUI/Jass tutorials to learn more.

You may even want to learn the basics of GUI and JASS too before you start. Good luck!
 
Level 8
Joined
Nov 20, 2008
Messages
445
He was actually asking how to stack buffs not how to overwrite them. Sadly this is impossible using the wc3 buffs.
The only workaround is to completely code your own buff system and use Auras in hidden spellbook to show the buff and simulate the effects(should be able to simulate almost every kind of buffs with the base auras and a little extra coding). Custom auras do stack even if based on the same aura.
 
Level 13
Joined
Jul 15, 2007
Messages
763
Only aura buffs can stack, you can use the Tornado's Slow Aura (It shows no icon on units), i'm not sure if you can change the buff directly to Shadow Strike or whatever disired, or wether you need to make a mod of Tornado's Slow Aura buff and change it into whatever, but you certainly need to do Add Ability to the target unit.

Auras aren't perfect, there's a small delay before the buff appears on the target, and when the spell is over you have to trigger it to Remove the aura and the buff (As aura buffs last longer than intended before fading)

Alternatively, you don't have to have a buff and have the 2nd spell entirely triggered.
 

Antares

Spell Reviewer
Level 21
Joined
Dec 13, 2009
Messages
509
You should use different buff types for different buffs to avoid stacking problems. If you run out of possible buff types, you have a problem. I did and I had to create a workaround so that still everything stacks with everything else. If you are interested, I can send you that.

Your shadowstrike has to be replaced with a missile spell, that does not trigger a debuff, lets say death coil. Then you cast the debuff with a dummy on the target.
 
Status
Not open for further replies.
Top