• 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.

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