• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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