Ardenian
A
Ardenian
How can I check in GUI/ GUIJASS whether a unit has 'Defend' activated ?
Just check for the buff.Oh, so the simple way (like others mentioned before) is to add the unit in a Unit Group, then make a check if the unit is in the Unit Group or not.
Did he already get what he wanted ? Post #7.
I thought so, too, but either I am too dumb or I did not see any. Manashield has one, but strangely Defend seems not to.check if unit has buff defend?
I think there is one.
Ah, the unit is invisible while it is under the activated Defend, so this would not be a problem, but thanks for paying attentionDefend has a Buff??!?
If so you SHOULD remove it, Ardenian, cuz it will tell the opponents that theyre being tricked.
GetUnitCurrentOrder(Hero) == OrderId("defend").
It worked for me with "drain"...
I use this for the initial check, if the ability is casted, but I need to know whether it is activated when other abilities are casted.The event is "A unit is issued an order with no target" (War3 Editor not with me atm).
The condition should be your OrderCondition (in this case, it's "defend" string for activation and "undefend" string for deactivation).
I did not find a buff for Defend, there is also no initial for the default ability for me. I don't know, I tried to add a custom one based on Manashield's one for Defend, but it did not work, afaik ( only checked for the visible icon, but not whether it triggers)Chaosy said:Checking for the buff is the best solution here. Provided that he didn't remove the buff from the default ability.