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

[Trigger] GUI Blink Movement

Status
Not open for further replies.
Level 8
Joined
Apr 23, 2011
Messages
322
I'm trying to make a unit that will move by "blinking".So, every time you "right click" somewhere to move, patrol or attack, triggering unit will move right there or max range into that direction.I tried doing it by giving that unit blink and a trigger that would order triggering unit to blink there, but it would only be triggered when I press "M" and then location.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
No need to add blink.

A simple trigger:
  • BlinkMove
  • Events
    • Unit is ordered targeting a point
  • Conditions
    • Or - Multiple conditions
      • Issued order equal to smart
      • Issued order equal to move
      • Issued order equal to patrol
  • Actions
    • Set TempPoint1 = position of unit
    • Set TempPoint2 = event response - target point of issued order
    • If (real - math - distance between TempPoint1 and TempPoint2 less than or equal to 600)
      • Then - Actions
        • Unit - move unit to TempPoint2
      • Else - Actions
        • Set TempPoint3 = point with polar offset - TempPoint1 offset by 600 towards angel between TempPoint1 and TempPoint2
        • Unit - move unit to TempPoint3
        • Custom script: call RemoveLocation(udg_TempPoint3)
    • ---- add some special effects ----
    • Custom script: call RemoveLocation(udg_TempPoint1)
    • Custom script: call RemoveLocation(udg_TempPoint2)
 
Status
Not open for further replies.
Top