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

add specific buff

Status
Not open for further replies.
Level 2
Joined
Dec 18, 2005
Messages
28
Since I found no native in JASS to add a specific buff to a unit, I was wondering if some1 can script a function that adds one. The thing is dummys wont help, also spells like feerie fire or slow or something with modified values so it doesnt do anything just adding a buff wont help me, since I also use those as normal spells and in case a unit is the target of another spell based on the same (like ff or slow mentioned before), those buffs should stack.
Hope you get what I mean ^^
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
sry, i dont have time to test this theory right now, but try

JASS:
UnitAddAbility( yourunit, 'yourbuff' )

---damn sucky JASS tags---

buffs are considered abilities.

For example, UnitRemoveBuffSpecificBJ or whatever its called is really
JASS:
UnitRemoveAbility( whichUnit, whichBuff )
to check if a unit has a buff, you use

JASS:
if GetUnitAbilitLevel( yourunit, 'yourbuffcode' ) > 0

get the point? lol
 
Status
Not open for further replies.
Top