• 🏆 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!

Movement shiz

Status
Not open for further replies.
Level 2
Joined
May 15, 2008
Messages
22
I've had the same problem. What you do is probably this:

Offset (Unit's Position) by 10 in (Facing Of Unit).

When a unit now enters a impassable area it tries to move away from there, so the (Facing Of Unit) gets totally messed up.

What I did to solve it:

Set MyAngleVariable= (Facing Of Unit) <-- Do this once at the beginning of the game


Offset (Unit's Position) by 10 in (MyAngleVariable). <- This is for movement.
(Facing Of Unit)=MyAngleVariable <-- This makes the unit look in the right direction

You probably have triggers for turning left or turning right. These need to be adjusted to work with MyAngleVariable:

Old: (Facing Of Unit) = (Facing Of Unit) +5
Now: MyAngleVariable=MyAngleVariable+5

I hope that's understandable :p I could give you the code sample, but it's in Galaxy, not GUI.
 
Status
Not open for further replies.
Top