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