Hi, I have a spell that pulls target enemy unit as sliding. It works but not as I wanted. (For example) It must pull 10 range then 20 then 30 each loop. I mean starts slow and ends fast. And it will look like a magnet. My trigger is completely reverse of this.. Starts fast and ends slow. First 100 then 90 then 80 til the target comes near caster. Here is my triggers, what is wrong?
JASS:
set x=GetUnitX(GetSpellAbilityUnit())
set y=GetUnitY(GetSpellAbilityUnit())
set ex=GetUnitX(enum)
set ey=GetUnitY(enum)
set dx=ex-x
set dy=ey-y
call SetUnitX(enum,ex-dx/20)
call SetUnitY(enum,ey-dy/20)