Cokemonkey11
Spell Reviewer
- Joined
- May 9, 2006
- Messages
- 3,570
Anyone know what's wrong with my script?
Somehow units are being affected by the pull when they don't meet the conditions. I'm confused TT
JASS:
local real angleTowards=angleBetweenXY(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),GetUnitX(tempBomb),GetUnitY(tempBomb))
local real distance=SquareRoot(((GetUnitX(GetFilterUnit())-GetUnitX(tempBomb))*(GetUnitX(GetFilterUnit())-GetUnitX(tempBomb)))+((GetUnitY(GetFilterUnit())-GetUnitY(tempBomb))*(GetUnitY(GetFilterUnit())-GetUnitY(tempBomb))))
if GetOwningPlayer(GetFilterUnit())!=tempOwner then
call SetUnitX(GetFilterUnit(),GetUnitX(GetFilterUnit())+(tempGravPull-distance)/20*Cos(angleTowards*bj_DEGTORAD))
call SetUnitY(GetFilterUnit(),GetUnitY(GetFilterUnit())+(tempGravPull-distance)/20*Sin(angleTowards*bj_DEGTORAD))
endif
return false
Somehow units are being affected by the pull when they don't meet the conditions. I'm confused TT