- Joined
- Jun 17, 2007
- Messages
- 1,433
The effect and everything is alright, but I have a few complaints:
1. The timer interval should be configurable as a constant.
2. A small lack of efficieny.
You might as well do something like this:
1. The timer interval should be configurable as a constant.
2. A small lack of efficieny.
JASS:
local real xc = GetUnitX(c)
local real xt = GetUnitX(t)
local real yc = GetUnitY(c)
local real yt = GetUnitY(t)
call Spell.GetValues(c,t,Atan2((yc-yt),(xc-xt)),(SquareRoot((xt-xc)*(xt-xc)+(yt-yc)*(yt-yc)))*2,GetUnitAbilityLevel(c,SpellID))
You might as well do something like this:
JASS:
local real dx = GetUnitX(c) - GetUnitX(t)
local real dy = GetUnitY(c) - GetUnitY(t)
call Spell.GetValues(c,t,Atan2(dy, dx),SquareRoot(dx*dx+dy*dy)*2,GetUnitAbilityLevel(c,SpellID))