Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
function SetImmovableUnitFacing takes unit u, real a returns nothing
call SetUnitPosition(u, GetUnitX(u), GetUnitY(u))
call SetUnitFacing(u, a)
endfunction
By the way, do you know how to get the angle towards which a spell was casted (it's casted by a building so I can't use GetUnitFacing(GetTriggerUnit()).
You want to get alpha. Opposite is y difference, adjacent x difference. Tan alpha is opposite divided by adjacent, so take arctan from that. Atan2 ensures that there is no division by zero.
It can also be done by Action: Unit - Make (Your building) <gen> face (your choice) degrees facing over (your choice) seconds
You will be the one to select it's events and conditions. Hope it would help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.