• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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