• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Unit - Movement without turning

Status
Not open for further replies.
Level 4
Joined
Jan 27, 2016
Messages
89
Basically I'm trying to make a unit (Necropolis) capable of moving but not changing its facing while doing so, because it looks really awkward. Any way to have a unit move naturally without turning? Using any sort of Periodic Triggers that update movement is not going to work due to the performance issues it causes, and making an attachment of the unit would screw up selection.
 
You ruled out the 2 easiest ways to do this. Another way would be to set the turn to 0, but then have it move with a looping movement system that shuts off when it is done. This might help the performance issue. Also, you can use pheonix fire to fire in any direction. This might help your unit fire backwards if you need that. You could also swap the unit's visible model for a special effect while moving and then return it once it reached a stop location. I know these are variations of what you ruled out, but it's going to have to be something like this.

Unit is issued an order.

Order is = attack, move, attack-move, patrol

hide u
change u's turn rate to 100
create a special effect attached to u facing 180
set loc = target point

---------------------------------------

Unit reaches loc

u = dynamic indexed correct u
destroy effect
change u's turn rate to 0
set u's facing angle to 180
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
If you use SetUnitX(yourUnit) and SetUnitY(yourUnit) it's possible.

Set movement to 0 but make sure it can walk in theory, I suppose there is a true/false something in the object editor for that.
Then use mentioned natives periodically.

Though that would require pathfinding so not optimal I suppose.

Another idea that came to mind was to hide the building and place a dummy on top. The dummy will be moved to the original building's location every X seconds and then it wont appear as if it is turning.
 
Status
Not open for further replies.
Top