• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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