• 🏆 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!

Turn a building

Status
Not open for further replies.
Level 1
Joined
Feb 2, 2020
Messages
1
Hi, I see this topic [Solved] - Changing building facing
I don't know how to use this fonction, How does it work? I'm a beginner ...

I would like for the player to be able to select a building and write "Turn X" to turn the building and orientate it to a certain value (X).

Thank you very much !
 
Level 39
Joined
Feb 27, 2007
Messages
5,024
My question about this is why? Buildings can attack/cast/see equally in all directions so turning the building is only a visual change. Since the camera angle is usually static facing +90* the facing angle of the building can probably be set in the OE so it looks good.

Did you try just using the Set Unit Facing GUI command like was suggested in the last post in that thread?
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
Something like this?
  • Rotate Building
    • Events
      • Player - Player 1 (Red) types a chat message containing -turn as A substring
    • Conditions
    • Actions
      • Set u = Barracks 0000 <gen>
      • Custom script: call SetUnitPosition(udg_u, GetUnitX(udg_u), GetUnitY(udg_u))
      • Custom script: call SetUnitFacing(udg_u, S2R(SubStringBJ(GetEventPlayerChatString(), 7, 9)))
 
Status
Not open for further replies.
Top