Greetings and thank you very much for taking the time to consider my request and much gratitude if you can actually help.
SCENARIO AND PROBLEM:
I am using a player controller script that implements step movement in a grid fashion that I want (like Dungeon Master of the old days), but the problem is that it does not include collision detection so the player walks through walls and other what should be impassable terrain. Some of you may be familiar with the Grid Move script located on the wiki: http://wiki.unity3d.com/index.php/GridMove (I am using a modified version by SteveJ posted in the thread below) (My game will have 2d movement rendered in 3d like Legend of Grimrock, etc.)
Eric5h5 posted in a thread talking about the movement I want and suggested to use a 2d array to represent the world and set the properties of each cell, then query that array to see if movement is possible.
REQUEST FOR HELP:
Please, I am trying to learn how to program and use a 2d Array to define cell properties on my map in a grid fashion so that I can set passable/not passable terrain. In other words: floor (passable), lava (not passable), wall (not passable), etc. I don’t want to draw the terrain with this method (would be invisible), I just want to define the cell properties and then query them in the Grid Move script (as modified by SteveJ) before actual movement to determine if the player can go to that location or not. ( 2 dimensional coordinates to represent each cell and the properties passable/not passable/other.)
I have searched for months, but it doesn’t look like the solution to this particular problem was ever revealed on the forums here. I haven’t had any luck with Google search either.
My request is not just what to do, but how to do it, as well.
SPECIFIC:
I need a tiny example that shows the entire process using Unity 3d and scripting in either JS/US or CS. Either would be fine. A tiny dungeon with small rooms and some hallways would work (would have walls to block movement and floors to walk on, etc.) I should be able to take the explanation and expand it to create my own complete dungeon levels/over-world levels guided by the 2d array to govern which cells are passable/not passable.
I don’t know how large an example 2d array script this would be or how long it would take to thoroughly explain it. I just hope it is not too much trouble for you to explain in detail for a newbie that really wants to learn exactly how to do it.
If there are any Unity Engine preference/configurations that I need to alter, please clarify. Please do not leave any steps out. Thank you.
I am grateful for your valued time, consideration, and effort! Seriously! This is a big request and I feel bad that I even have to ask for help.
Cheers!