• 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.

Rotate a building by 45 Degrees every cast?

Status
Not open for further replies.
Level 3
Joined
Mar 17, 2011
Messages
34
I have looked for an answer for this, but to not avail, I was wondering if you guys know.

I would like to have an ability for walls in my map, which would hopefully rotate the building by 45 degrees every cast. Is there any way to make this work effectively?

Probably a stupid question, but oh well xD

Thanks for reading and any help would be appreciated.
 
Level 13
Joined
Oct 25, 2009
Messages
995
I know this way can change the face angle of the units.
  • Face Angle
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Face Angle
    • Actions
      • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit)), facing (Target point of ability being cast)
-.-
 
Here you got example how to do facing properly - it was made for request 'Towers facing victims when attacking'.

Click here.
  • Face Angle
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Face Angle
    • Actions
      • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit)), facing (Target point of ability being cast)
-.-

Your trigger leaks, and you should set the angle for proper rotating.

  • Actions
    • Set Temp_point = (Position of (Triggering unit))
    • Set Angle = (Facing of (Target of ability being cast))
    • Unit - Move (Triggering unit) instantly to Temp_point, facing (Angle - 45) degrees
    • Custom script: call RemoveLocation (udg_Temp_point)
 
Status
Not open for further replies.
Top