- Joined
- May 20, 2009
- Messages
- 821
So, I actually made this before using Paladon's Knockback system. However, I can't seem to figure out now...
This is my trigger currently:
And what this does is instead of knocking the unit away from the target point of the order, it knocks them toward it. But I can't seem to get the angle right. It's always off or sometimes goes in the complete-opposite direction of the target point.
This is my trigger currently:
-
Untitled Trigger 003
-

Events
-


Unit - A unit Is issued an order targeting a point
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Triggering unit) is A flying unit) Equal to True
-
-



Then - Actions
-




Game - Display to (All players) the text: (X of Target Point = + (String((X of (Target point of issued order)))))
-




Game - Display to (All players) the text: (Y of Target Point = + (String((Y of (Target point of issued order)))))
-




Set KBA_Caster = (Triggering unit)
-




Set KBA_DestroyTrees = False
-




Set KBA_DistancePerLevel = (Distance between (Position of (Triggering unit)) and (Target point of issued order))
-




Set KBA_Level = 1
-




Set KBA_Speed = 15.00
-




Set KBA_StartingPosition = ((Target point of issued order) offset by ((Distance between (Target point of issued order) and (Position of (Triggering unit))) - ((Distance between (Target point of issued order) and (Position of (Triggering unit))) x 2.00)) towards (Angle from (Position of (TriggeringUnit))) x 2.00)) towards (Angle from (Position of (Triggering unit)) to (Target Point of Issued Order)
-




Set KBA_TargetUnit = (Triggering unit)
-




Trigger - Run Cast A Knockback <gen> (checking conditions)
-




Game - Display to (All players) the text: (X of Target Point = + (String((X of (Target point of issued order)))))
-




Game - Display to (All players) the text: (Y of Target Point = + (String((Y of (Target point of issued order)))))
-
-



Else - Actions
-
-
-
And what this does is instead of knocking the unit away from the target point of the order, it knocks them toward it. But I can't seem to get the angle right. It's always off or sometimes goes in the complete-opposite direction of the target point.
















