I suppose you could make the spell a non channeling spell, and trigger its effect like so:
Trigger:
- Spell Begin
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Not_Really_A_Channeling_Spell
- Actions
- Set Spell_Caster = (Casting unit)
- Set Spell_Target = (Target unit of ability being cast)
- Trigger - Turn on Spell_Effect <gen>
Trigger:
- Spell_Interrupt
- Events
- Unit - A unit is attacked
- Unit - A unit Starts the effect of an ability
- Unit - A unit Is issued an order targeting a unit
- Conditions
- (Attacked Unit has buff of type Not_Really_A_Channeling_Spell (caster)) Equal to True
- Actions
- Trigger - Turn off Spell_Effect <gen>
- Unit - Remove Not_Really_A_Channeling_Spell (caster) buff from Attacked Unit
Where Spell_Effect is a trigger that runs periodically and gives the actual effect of your ability.
You may have to split the second trigger into three triggers, one for each event, or, you could declare a boolean variable, to store whether the spell is being cast or not, and check for the variable's state in the conditions instead.
This is what I'm looking for mainly, but will it get stopped if the caster gets stunned?