x


Need help on building a tactical rpg system.

I'm talking about something like this:

alt text

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.

more ▼

asked Jan 17 '12 at 10:14 AM

Elysian.Zhen gravatar image

Elysian.Zhen
118 10 11 14

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 ?

Jan 17 '12 at 12:10 PM Fattie

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!

Jan 17 '12 at 12:37 PM RockDude

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.

Jan 18 '12 at 05:43 AM Elysian.Zhen
(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

This question is better asked on forum.unity3d.com

more ▼

answered Jan 17 '12 at 12:53 PM

Meltdown gravatar image

Meltdown
5.6k 18 25 49

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)
10|3000 characters needed characters left

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".

more ▼

answered Jan 18 '12 at 10:45 PM

Alverndbl gravatar image

Alverndbl
31

Thanks for that.

Jan 19 '12 at 01:28 AM Elysian.Zhen
(comments are locked)
10|3000 characters needed characters left

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 :)

more ▼

answered Feb 07 '12 at 12:38 AM

Astreos gravatar image

Astreos
16 2 2 2

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1427
x983
x101
x48
x33

asked: Jan 17 '12 at 10:14 AM

Seen: 2042 times

Last Updated: Feb 07 '12 at 12:38 AM