my spell does not work correctly. here the triggers:
i have based this spell on "Faerie Fire" ability because i need always use autocast. Now my spell work good only for 1 target, but if i use this spell more than one time before buff does not expires spell get crashed it return movement speed back only the for the last unit on whose i used spell.
how can i fix this problem ?
thanks
sry for bad english
Code:
ice
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Ice
Actions
Set target = (Target unit of ability being cast)
Unit - Set the custom value of target to 1
Special Effect - Create a special effect attached to the origin of target using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
Unit - Cause (Triggering unit) to damage target, dealing (Mana of (Triggering unit)) damage of attack type Spells and damage type Cold
Special Effect - Destroy (Last created special effect)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(target has buff Ice ) Equal to False
Then - Actions
Set ms = ((Current movement speed of target) x 0.50)
Unit - Set target movement speed to ms
Else - Actions
Code:
magecheck
Events
Time - Every 1.00 seconds of game time
Conditions
(Custom value of target) Equal to 1
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(target has buff Ice ) Equal to False
Then - Actions
Set ms = ((Current movement speed of target) / 0.50)
Unit - Set target movement speed to ms
Unit - Set the custom value of target to 0
Else - Actions
i have based this spell on "Faerie Fire" ability because i need always use autocast. Now my spell work good only for 1 target, but if i use this spell more than one time before buff does not expires spell get crashed it return movement speed back only the for the last unit on whose i used spell.
how can i fix this problem ?
thanks
sry for bad english