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

[Spell] Unit Face Points

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi all.

I am trying to cause a unit to face a point, but the unit has movement disabled. Because of that, the dummy unit that its created flies in the same direction over and over.

  • Actions
    • Set P_StartLoc = (Position of (Triggering unit))
    • Set P_EndLoc = (Target point of ability being cast)
    • Set P_ShotCaster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
    • Unit - Make P_ShotCaster[(Player number of (Owner of (Triggering unit)))] face P_EndLoc over 0.00 seconds
    • Unit - Create 1 Dummy Shot for (Owner of (Triggering unit)) at P_StartLoc facing (Facing of P_ShotCaster[(Player number of (Owner of (Triggering unit)))]) degrees
    • Set P_ShotDummy[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
    • Set P_ShotRange[(Player number of (Owner of (Triggering unit)))] = 0
    • Unit Group - Add P_ShotDummy[(Player number of (Owner of (Triggering unit)))] to G_ShotGroup
    • Set P_CurrentShots = (P_CurrentShots + 1)
    • Trigger - Turn on Move Shot <gen>
    • Custom script: call RemoveLocation ( udg_P_StartLoc )
    • Custom script: call RemoveLocation ( udg_P_EndLoc )
How would I either cause the casting unit to face the point or the dummy unit to face the point?
 

sentrywiz

S

sentrywiz

Even though a unit has 0 movement speed it can still turn. So just use the face point/face unit action.

I did. Its in the trigger

  • Unit - Make P_ShotCaster[(Player number of (Owner of (Triggering unit)))] face P_EndLoc over 0.00 seconds
But it still doesn't work.
 
Status
Not open for further replies.
Top