DemonHunterSX said:
oh, sry i shud be more clear next time, what i ment was can i make an ability stop its effect if the hero stops casting it? for example if the litch casts death and decay, then all of a sudden stops, the effect of death and decay will stop. this is wat i wanna do for my chanelling spells.
Make two trigger for one channel spell:
1. channel
Events
Unit Begins channeling an ability
Conditions
Ability being cast equal to xxx
Action
set variable IS_CHANNEL = true
//this is just example//
For loop 1 to 15
IF IS_CHANNEL = true then
- Create dummy unit
- Add expiration timer
- order dummy to do something
- Wait 1 sec.
//end of example//
2. channel off
Events
Unit stops casting an ability
Conditions
Ability being cast equal to xxx
Action
set variable IS_CHANNEL = false
So, when unit stops channeling, variable IS_CHANNEL will become false, and he will no longer create dummy unit to do something.
Next time he cast the ability again, the variable will become true again, then false, true, false , and so on.. ( That's the tru/false flag method)