I'm talking about something like this:
Where you use a tile engine to create a map made out of rectangular cubes. My problem is, how do I create a player movement system like those in Final Fantasy Tactics.
For example: when a character is activated, a range of tiles around the character will be shown in blue indicating that it is possible for the character to move onto. (As shown in the image above).
I tried making it, but it screws up every time -_-; because of my faulty logic. Can anyone give me some help? Thanks.
asked Jan 17 '12 at 10:14 AM
I don't know the exact way to implement this, but your first steps are these: 1) Find a way to implement the grid first. My suggestion is a 2d array with tiles from box prefabs. 2) When you have a character in a tile, you search all the adjacent tiles, computing the movement cost and marking the tiles as passable or not. This method is called recursively until the end of movement points. You store all the passable tiles in an Array (or even better on a List) and give them the blue color.
I'm sure there are other ways and better too, but it's a start :)
As a start you could try the Grid Movement example of iTween:
you can download iTween in Asset Store.
How to draw the "possible move grid" is still unknown to me. I've seen some examples on the forum where every "blue square(as in FF tactics)" was a plane but that is kinda "dirty".