• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Trigger Question

Status
Not open for further replies.
i mean the dummy unit will not go instantly to the certain location or the targeted unit but the dummy unit will go/walk to the certain location or targeted unit.
 
If you wanted to issue the dummy to "Move" to the target location then you would use Unit - Issue point order or maybe a target-order. If you're trying to move the unit instantly then what GoGoTauren has said is the correct solution.

This is what the interface looks like:
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit - Order No unit to Move To ((Center of (Playable map area)) offset by (0.00, 0.00))
The fields for the interface are way wrong but you get the point :P
 
You need a periodic event that sets the units position with offset.
  • Trigger
  • Events
    • Time - Every 0.03 seconds of game-time
  • Conditions
  • Actions
    • Set Points[1] = (Position of (your unit))
    • Set Points[2] = (Points[1] offset by 15.00 towards (Facing of (your unit)))
    • Unit - Move (your unit) to Points[2]
    • Custom script: call RemoveLocation (udg_Points[1])
    • Custom script: call RemoveLocation (udg_Points[2])
 
  • Events
    • Time - Every 0.03 seconds
  • Conditions
    • \\Some Conditions here.
  • Actions
    • Set dummyunit = YOURDummyUnit
    • Set dummy_loc = Position of (YOURDummyUnit)
    • Unit - Move Instantly to dummy_loc offset by 10.00 towards [color="red"]angle[/color]
    • Custom script: call RemoveLocation(dummy_loc)
I'm not sure if I got the GUI syntax correct but it is somewhat like that.
You need to use the Event every X seconds to make your dummy move faster than 522 movespeed. Lower seconds means faster movement or change of location.
You will use the function PolarProjectionBJ or Polar offset in GUI to make your unit move 10.00 distance from his current location.

edit: Pharaoh you are really fast! I mean it! :grin:
 
tnx, i understand it better now, but i still have one question...

for example you made your unit go to the targetted unit, how can you kill the unit exactly when the unit reaches the enemy unit?
 
Last edited:
No, what you would want to do is calculate the time it will take for the missile to reach the unit. This is calculated by dividing the distance (m) by the velocity (m/s) which will yield the time (s). Once you've calculated the time necessary to reach the target unit, you'll need to use a real variable to keep track of how much time has lapsed.
 
can i just add. how would change the direction -
(i just saw this post and set the triggers up and i was like cool :3)

EDIT: While the unit is moving. because i tried after throwing in pharaohs triggers and my footman went all the way to the end of the map and i couldn't do anything :L
im not the smartest person when it comes to the editor but yeah.

EDIT2!!: i just realized its not meant to turn cause its a dummy. possibly being used for a spell right.. or something.
 
That would be a pain in the a**, if we had to count or predict the time. This is what distance between points can do. Just have a check
  • If (All conditions are true) then do (Actions) else do (Actions)
  • If - Conditions
    • (Distance between Points[1] and Points[2]) Less than or Equal to 15.00
  • Then - Actions
    • Unit Group - Remove (Picked unit) from MissileGroup
    • Unit - Kill (Picked unit)
    • Unit - Remove (Picked unit) from the game
 
Well it's not really that difficult, and it's necessary for precise collision time. I'm not going to argue with you over which way is easier if he wants to do it your way, that would work, though I prefer a linear comparison between two values to maintain as much accuracy as possible.
 
It's definitely an alternative, I don't doubt that, it's just the fact that distance seems more accurate. The missile has a fixed speed (moves a specified offset per specified tick). If the target widget is moved for some reason or, if it's a unit, receives extra speed, the timer will become inaccurate, because it's a preset value, meaning a value that has been set before the periodic timer.

Edit: Did you mean anything else?
 
Pharaoh_ said:
it's just the fact that distance seems more accurate.

They are both based off of the exact same principal, so they are pretty much the exact same in terms of accuracy. After thinking about it for a little I couldn't really come to any reason as to why distance would be worse to use than time, they are both relatively similar methods.
 
Status
Not open for further replies.
Back
Top