I apologize if this has a million other threads solving this problem but I couldn't find them.
I was wondering how to cancel a triggers functions once a unit moves, eg. stops casting/channeling the ability.
Right now I have a custom "starfall" ability where if the unit casting cancels the spell early he will continuously have explosions on his position but be doing no damage.
I understand that the "wait" function is probably not the ideal thing to be using here, but I am unsure how to make a cleaner trigger that would work better, or even properly.
This one works, but it would be vastly superior to have one that does not have inconsistent special effects.
I'm also interested in this because I may have triggers that are not only special effects that will need to stop their functions when the ability is no longer channelled.
I was wondering how to cancel a triggers functions once a unit moves, eg. stops casting/channeling the ability.
Right now I have a custom "starfall" ability where if the unit casting cancels the spell early he will continuously have explosions on his position but be doing no damage.
I understand that the "wait" function is probably not the ideal thing to be using here, but I am unsure how to make a cleaner trigger that would work better, or even properly.
This one works, but it would be vastly superior to have one that does not have inconsistent special effects.
-
MG InfPillar
-
Events
-
Unit - A unit Begins channeling an ability
-
-
Conditions
-
(Ability being cast) Equal to Inferno Pillar (MG)
-
-
Actions
-
For each (Integer A) from 1 to 7, do (Actions)
-
Loop - Actions
-
Set VariableSet UnitAbilPos[1] = (Position of (Triggering unit))
-
Special Effect - Create a special effect at UnitAbilPos[1] using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-
Set VariableSet SpecialEffectAbil[0] = (Last created special effect)
-
Special Effect - Set Scale of SpecialEffectAbil[0] to 1.25
-
Special Effect - Set Color of SpecialEffectAbil[0] to r: 175, g: 175, b: 55
-
Wait 1.50 seconds
-
Special Effect - Destroy SpecialEffectAbil[0]
-
-
-
Custom script: call RemoveLocation(udg_UnitAbilPos[1])
-
-
I'm also interested in this because I may have triggers that are not only special effects that will need to stop their functions when the ability is no longer channelled.