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

how can Add buff to units with triggers

Status
Not open for further replies.
Level 4
Joined
Aug 18, 2011
Messages
73
hello guys
how can i Add buff to units but with trigger instead of spell data
you know how it could be necessary in Gui spells because you set everything with triggers (dummy,damage,effects) but you have to add buffs with spells data?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
This won't work; UnitAddAbility(unit, 'buff')
But strange enough, this work; UnitRemoveAbility(unit, 'buff')

So you can't add buff via trigger, but you can remove buff via trigger (even when not using the RemoveBuff function, but by using RemoveAbility function because somehow, buff is considered as an ability when added to a unit)
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
You customize everything with triggers but do not use jass. Seems legit. Yes, you can insert single jass lines into GUI triggers with the Custom Script action but you should still know more of jass.

Instead of casting, you may also add an aura ability like the tornado slow aura that only works on oneself though that has some leveling up problems.

@defskull: Buffs are extends of abilities. So adding them has only a meaning via abilities to gain their behavior like being lost on death or dispel. Removal of buffs on the other hand is an interface, now it has an ability it belongs to and knows to dispose it.
 
Status
Not open for further replies.
Top