Moving Unit

Status
Not open for further replies.
Summon you mean by spell? If so,
  • Trigger1
  • Events
    • Unit - A unit spawns a summoned unit
  • Conditions
    • ((Unit-type of (Summoned unit)) Equal to X
  • Actions
    • Set Unit1 = Summoned unit
    • Set Point1 = (Position of (Unit1))
    • Set Point2 = ((Point1) offset by 500.00 towards (Facing of (Unit1))
    • Unit - Order (Unit1) to Move to (Point2)
  • Trigger2
  • Events
    • Time - Every 0.03 seconds of game times
  • Conditions
    • ((Unit1) is alive) Equal to True
  • Actions
    • Set Point3 = (Position of (Unit1))
    • If/ then / else
      • If (Conditions)
        • ((Distance between (Point2) and (Point3)) Less than or Equal to 30.00
      • Then (Actions)
        • Trigger - Turn off (This trigger)
        • Custom script: call RemoveLocation (udg_Point1)
        • Custom script: call RemoveLocation (udg_Point2)
        • Unit - Explode (Unit1)
      • Else (Actions)
    • Custom script: call RemoveLocation (udg_Point3)
If it is a trained unit, just replace the event with "Unit - A unit finished training a unit" and the Condition "Unit-type of (Trained unit) Equal to X"
 
Status
Not open for further replies.
Top