• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Turn a building

Status
Not open for further replies.

DonoDovi

D

DonoDovi

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 !
 
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?
 
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.
Back
Top