• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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)
-.-
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
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