|
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.
(comments are locked)
|
|
This question is better asked on forum.unity3d.com Thank you for telling me in a more appropriate manner :) Rather than OH NOEZ!!!! THIS IS NOT UNITY QUESTION!!!
Jan 18 '12 at 05:45 AM
Elysian.Zhen
(comments are locked)
|
|
As a start you could try the Grid Movement example of iTween: http://itween.pixelplacement.com/examples.php 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". Thanks for that.
Jan 19 '12 at 01:28 AM
Elysian.Zhen
(comments are locked)
|
|
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 :)
(comments are locked)
|


To be honest this is more of a GENERAL PROGRAMMING QUESTION that has nothing to do with Unity. Perhaps you should try a site like "game dev" or the like ?
THIS IS NOT UNITY QUESTION!!!People won't just waste their time to write 3pages of scripts so you could use them...Learn the scripting and you have answer to your question!
Now now kids, no need to get upset : I don't recall asking for anyone to script ANYTHING for me. I just wanted some basic help (Eg: Should I use AStar?), that's all. I'm sorry if I offended you two.