• 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] How can i make a unit move to a point (not instantly)

Status
Not open for further replies.
Level 3
Joined
Mar 7, 2008
Messages
25
I'm newb at using triggers an i relly need help :cry: ..... I'm sick of searching on the forum so [RAINBOW]plzzzz help [/RAINBOW]:cute:
 
You should have told him how to remove the leaks.

  • Remove Leaks
    • Events
      • Your event
    • Conditions
  • Your Condition
    • Actions
      • Set point_variable = (Center of (X))
      • Unit - Order (X) to Move To point_variable
      • Custom script: call RemoveLocation(udg_point_variable)
Open the triggerwindow and press Ctrl + B if you don't know how to open the variable window.
 
Level 3
Joined
Mar 7, 2008
Messages
25
umm....yeah....but i wanted to know (i'm sorry i've not specified) how can i make my unit move with higher speed than 522 ..... to move the unit to another unit.... :bored:
 
Level 3
Joined
Mar 7, 2008
Messages
25
You should have told him how to remove the leaks.

  • Remove Leaks
    • Events
      • Your event
    • Conditions
  • Your Condition
    • Actions
      • Set point_variable = (Center of (X))
      • Unit - Order (X) to Move To point_variable
      • Custom script: call RemoveLocation(udg_point_variable)
Open the triggerwindow and press Ctrl + B if you don't know how to open the variable window.





yes this sounds cool...i know how to open the variables window....but wht variables i must create?
:sad:
 
Level 9
Joined
May 27, 2006
Messages
498
Angelx, you can't make unit move faster than 522 by the Object Editor. To make it move somehow faster, you'll have to use the 'move unit instantly to point' on a short distance and run it every short period of time.
An example:
  • blah01
    • Events:
      • Time - Every 0.04 seconds of game time
    • Conditions:
    • Actions:
      • Set TempPoint1 = Position of [the_unit]
      • Set TempPoint2 = TempPoint1 with offset 20 [(total distance your unit have to move to) x (time), here it's: 500 x 0.04] facing (Facing of ([the_unit]))
      • Unit - Move [the_unit] instantly to TempPoint2
      • Custom script: call RemoveLocation( udg_TempPoint1)
      • Custom script: call RemoveLocation( udg_TempPoint2)
As to your question about creating variables, you press the green 'X' icon in the variable window, then a new window appears where you enter the variables name and specify its type. The type of variable used in the trigger above is 'Point'. Then you hit 'Ok' button, and you're done - you've created your first variable!
 
Status
Not open for further replies.
Top