[Solved] What am i missing? Detect behind.

Level 18
Joined
Jun 2, 2009
Messages
1,233
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Attacking unit))
      • Set TempPoint2 = (Position of (Attacked unit))
      • Set TempReal = (Facing of (Attacked unit))
      • Set TempPoint3 = (TempPoint offset by (Facing of (Attacked unit)) towards 0.00 degrees)
      • Unit - Order (Attacked unit) to Move To TempPoint3
      • Cinematic - Ping minimap for (All players) at TempPoint3 for 1.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint3)
If unit takes damage, i want to make it turn back and move few steps. This is my more than 50'th try and still trying to figure it out.
How can i detect behind?
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
This would be correct:
  • Set TempPoint3 = (TempPoint offset by SOME_DISTANCE towards ((Facing of (Triggering Unit)) + 180.00) degrees)
You have used the unit's facing value (an angle) where the polar offset distance argument is, and have left the angle at a hardcoded 0 degrees. It helps to read the argument names and descriptions and put the right stuff in the right places.
 
Level 18
Joined
Jun 2, 2009
Messages
1,233
Yes. Much better but in the opposite, he is running to me instead of back.
Update: Still i haven't solved. I want to make it run back. Not front.
Update 2: Solved. This one is the correct.
  • Set TempPoint3 = (TempPoint2 offset by 1500.00 towards (Angle from (Position of (Attacking unit)) to (Position of (Attacked unit))) degrees)
 
Last edited:
Top