is there any way of make a trigger run when a unit right clicks an auto-cast ability? (when turns auto-cast on) If not how I can make 2 triggers like that: the one runs when a unit turns immolation on and the other runs when a unit turns immolation off
Yes, I think this is doable. All the auto-cast abilities have 2 order strings, an "on" and "off" order which enables/disables auto-casting. So if you base your ability from, say, Poison Arrows, you'd do something like this...
if ( GetIssuedOrderId() == OrderId("poisonarrows") ) then [do your stuff here]
The way I would handle the situation would involve making 2 dummy spells. The first one would be "turn on" and the second "turn off". I would then trigger my spell (or use JASS...) to detect when they turn it on/off and make 2 triggers like this:
Activate Spell
Trigger:
Turn On
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Turn On Immolation
Actions
-------- Running is a boolean. True=Spell is running. False=Spell is not running. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Running Equal to False
Then - Actions
Set Running = True
Trigger - Run When On <gen> (checking conditions)
Else - Actions
Deactivate Spell
Trigger:
Turn Off
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Turn Off Immolation
Actions
-------- Running is a boolean. True=Spell is running. False=Spell is not running. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Running Equal to True
Then - Actions
Set Running = False
Trigger - Run When Off <gen> (checking conditions)
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.