• 🏆 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] Units Never Stop?

Status
Not open for further replies.
Unit - Pause unit? Those units get no orders at all. Here:
  • Trigger
  • Events
    • Unit - A unit is issued targeting a point
  • Conditions
  • Actions
    • Set Targ_P = (Target point of issued order)
    • Set Ordered = (Ordered unit)
    • Unit - Pause (Ordered)
    • Trigger - Turn on Trigger2 <gen>
  • Trigger2 - NOT initially enabled!
  • Events
    • Time - Every 0.1 seconds of game-time
  • Conditions
    • ((Ordered) is alive) Equal to True
  • Actions
    • Set Current_P = (Position of (Ordered))
    • If/ Then/ Else
      • If (Conditions)
        • ((Distance between (Targ_P) and (Current_P)) Less than or Equal to 25
      • Then (Actions)
        • Unit - Unpause (Ordered)
        • Custom script: call RemoveLocation (udg_Targ_P)
        • Set Ordered = No unit
        • Else (Actions)
    • Custom script: call RemoveLocation (udg_Current_P)
 
Level 10
Joined
Jan 28, 2009
Messages
442
If your unit is not supposed to "walk" with an animation, but just slide through your level, I know it can done with reliability by constantly move (instantly) the unit inch by inch.
But any ongoing animation stops when you move (instantly) a unit. So if you want it to be animated, set a fishing pole with a carot in front of it. By that I mean create a dummy unit and set your unit to follow the dummy. Constantly move (instantly) the dummy to a place at some distance in the facing angle of your unit. Set the dummy very close to your unit (like 128 or less), because otherwise your dummy will automatically switch direction when it comes close to a wall. Now, go to Gameplay_Constants and set Units_FollowRange to a value that fits the range ur using.
 
Level 6
Joined
Mar 20, 2008
Messages
208
I imagine Blizzard just constantly issued them the move order to a point thats like 5 feet in front of them.

Disable it intially until the unit is issued the order
Disable it on death
 
Level 4
Joined
Mar 14, 2009
Messages
98
Or, whenever some order is issued, you get a point 10000000000000 range away, in the same angle then tell the unit to go there. Maybe that would work? Oh, and save the point in some variable so that whenever an immediate order is issued, the unit would be ordered to move to the point again. I haven't really tried this, and Shyhalu's suggestion might be better.
 
Status
Not open for further replies.
Top