Warcraft III resources & community, 2003–2006 · archived

PolarMove

not rated
Submitted by Aiursrage2kVariable Change0 downloads
Suppose you want to do frequent moving of units. You would first have the to get the location of the unit and then do a polar projection. Therefore you would need to create destroy 2 locations. This only requires one.

Source

function PolarMove takes location source, real dist, real angle returns nothing
   call MoveLocation(source,GetLocationX(source) + dist *Cos(angle * bj_DEGTORAD),GetLocationY(source) + dist * Sin(angle * bj_DEGTORAD))
endfunction

Comments

0

No comments.