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

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