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

Detecting if a unit has an ability enabled

Status
Not open for further replies.
Level 4
Joined
Aug 30, 2005
Messages
94
I am trying to create a spell based on mana sheild that absorbs magical damage done to the hero and gives him life equal to the damage taken yet drains mana equal to the life gained, however I have been unable to find the trigger that enables me to check if the target of a spell has the set ability enabled and then go about giving the hero life. If anyone can help me find the tigger that checks if the unit has an ability enabled it would be greatly appreciated.
 
Level 8
Joined
Jul 28, 2004
Messages
258
You have to use orders, the order for turning on and off an ability is in the object editor, a switch type ability like defend has a use/turn on and a turn off order, when the unit is ordered the use/turn on order, u set a variable/handlevar/custom value (ur choise) to true, when he is ordered the turn off order, u set that variable/handlevar/custom value to false.
then u can find if the unit has that ability enabled if his variable/handlevar/custom value is set to true.
 
Level 4
Joined
Aug 30, 2005
Messages
94
I don't need help tuning it on an off, what I need is a way to detect if it is activated or not.
 
Level 4
Joined
Aug 30, 2005
Messages
94
Pardon me, the fist time I read it I must have missed the last line and skimmed the first, thanks anyhow man.
 
Status
Not open for further replies.
Top