Warcraft III resources & community, 2003–2006 · archived

add specific buff

4 posts
#1

add specific buff

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 ^^
#2
sry, i dont have time to test this theory right now, but try

UnitAddAbility( yourunit, 'yourbuff' )


---damn sucky JASS tags---

buffs are considered abilities.

For example, UnitRemoveBuffSpecificBJ or whatever its called is really

UnitRemoveAbility( whichUnit, whichBuff )

to check if a unit has a buff, you use


if GetUnitAbilitLevel( yourunit, 'yourbuffcode' ) > 0


get the point? lol
#3
Your theory is wrong ^^
#4
kk thx for telling me

in that case, the only way would be to cast an ability on the unit.