Well
What ur asking about is the Observer Grid.
The Observer grid detects which way the unit is facing.
How it does this is simple: You have a marine. It sets up a 3x3 Grid (each Grid square having 1x1, and theres 9 grid squares.)
It then (Through Giving and removing) Separates The Directions Left, Right, Up, and Down.... Here, Ill show you using this incredibly sophisticated and intricate Diagram I have created.
For Example, Lets say Each Face is an Observer Created Over the Marine.
(The Red one is the Marine With an Obs Over it.)
(So, Then, Through Giving and Removing, We Switch it to this.)
(The Sad Faces Are the spots or places of the removed observers.)
The Happy Faces are Still being used, and the Flamer Face Is just where the Marine Is.
Now, We Give Each Observer To a separate player.
Red=
Teal=
Purple=
Orange=
UNUSED =
Marine Location =
So, We Give them to their separate players, Which results in this.
So, Now we Convert Each Observer into a Location.
Player 1
Current Player Commands At least 1 Observer
Center Location "Left" On Observers Owned by Current Player
Remove All Observer Owned By Current Player at "Left"
Preserve Trigger
Ok, Now we Have our locations Around Our marine.
So, We can Tell if he Moves anywhere, because hes gonna move into at least one of those locations.. Right?(Unless if he Moves at a Perfect 45 Degree angle for the entire game, which he wont.)
And if he moves, anywhere, hes GOT to be facing that same direction... Correct?
So, Now you Whip our a devourer grid when he moves into one of the four of those locations and then throw a burrowed zergling out there. (make sure that instead of using a "Create a zergling here" trigger, Use a "Move the Zergling here", So you dont get the "CANNOT PLACE UNIT HERE" beep every time he makes a step near a cliff.
You can even make it more precise, so if he walks in a Diagonal, he Gets the vision there, just use the same Principles. Im just lazy.
The Observer Grid Accomplishes this.
The Observer Grid Basically Tells the Devourer Grid how to set up, by telling it which way the Marine is facing.
The Devourer Grid then just says "Ok, well, the Marine is Moving Upwards, therefore, the Marine Must be facing Up, because the marine doesnt walk backwards."
So, It sets up a Ling a few inches away (on the computer screen). This can be adjusted so there are more than one lings, and lings farter away, or you can use a hydra AND a ling so it sorta..."Fans Out".
Holy crap that was alot of typing. You better have ur question answered or im gonna stab you.
-edit-
Hey, Smilies can be used for an incredibly Easy way of teaching, Making sophisticated diagrams, and Pictures. Who knew? haha
Post has been edited 4 time(s), last time on Dec 31 2007, 3:38 am by Pyro682.
None.