Building Facing

Status
Not open for further replies.
Level 4
Joined
Sep 15, 2013
Messages
53
Can someone teach me how to use the function below? I read that i can rotate placed buildings in the map using this.

"function SetImmovableUnitFacing takes unit u, real a returns nothing
call SetUnitPosition(u, GetUnitX(u), GetUnitY(u))
call SetUnitFacing(u, a)
endfunction"

Im trying to rotate nightelf buildings. I cant use stats-building false since the buildings are already placed in the map. I tried editing the degree values of the bldgs created but it worked only for undead buildings. The nightelf bldgs have root ability.. is that the reason?
 
Last edited:
It works for all buildings for me. Regarding structures that own Root ability, they even display that nice turning animation, which is not the same for the others.

OFF: Also, using Show/Hide function also "updates their current facing angle", so I ended up not using SetUnitPos func. Though, it unfortunately removes that structure from a player selection, which is not good.

EDIT:
Untitled-1.png
 
Last edited:
Status
Not open for further replies.
Back
Top