• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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:
Level 13
Joined
May 10, 2009
Messages
868
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.
Top