Frozenhelfir
set Gwypaas = Guhveepaws
- Reaction score
- 56
I'm trying to make a custom slowing (orb) effect. The unit in question already has an orb that is used for something else, and I want its attacks to hit units with a stacking slow. For simplicity, each attack slows the units movement speed by 10% of its current speed. So if it were hitting a unit with 100 ms, it would drop it to 90, and then 81 (10% of 90 is 9). So I start out with a concept:
This will store the unit being effected, conserve its MAX MS, and keep the current MS stored for the slow. This isn't the problem. Restoring the movement speed is the problem. I can either set it back to the max MS or divide by .9 for each iteration. Both of these wont work. What if the unit gains a movement speed increasing buff, like a speed scroll? Then if I set its movespeed back to its maxMS, when the speed scroll wears off it will be slower than it used to be. Also, if it had that buff when the unit started getting slowed, and then the effect wore off in the middle of the slow, at the end it would go back to the speed scrolled ms.
Is there any way I can do this without making it into a huge headache?
This will store the unit being effected, conserve its MAX MS, and keep the current MS stored for the slow. This isn't the problem. Restoring the movement speed is the problem. I can either set it back to the max MS or divide by .9 for each iteration. Both of these wont work. What if the unit gains a movement speed increasing buff, like a speed scroll? Then if I set its movespeed back to its maxMS, when the speed scroll wears off it will be slower than it used to be. Also, if it had that buff when the unit started getting slowed, and then the effect wore off in the middle of the slow, at the end it would go back to the speed scrolled ms.
Is there any way I can do this without making it into a huge headache?