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

[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