So, i started to make a map again. Its a RPG and what im trying to do is make a directions detection system, So far i have it pretty good, i have 2 locations thats extend from 1 side of the map to the other, one is vertical and the other is horzontal, Then there are 3 differnt kinds of units on the side to detect the movement. If anyone knows a simple, type grid system that would be helpful.
None.
OK, I moved your topic to UMS Assistance, since you're not displaying a new idea, nor are you asking for a new idea to be applied to your map.
What you have set up now is a coodrinate system, just like the
Unit Coordinate Detection article suggests. If you want to detect what direction the unit has moved, you have several options.
If you want to have only the 8 basic directions (a more advanced modification of this method can give you 16 directions), you can set up a Mobile Grid around your unit (see Mobile Grids in the Grid Systems article Kaias posted) and just check which of the 8 sides the unit moved to. This method does not work if you have air units near your 'hero'.
Working from what you already have (a coordiante system), you can simply compare the new unit coordinates with the old ones via
Binary Countoffs and get the direction from there. This requires a little trick to be added. If you're interested in this method, I'll describe this trick.
None.