by Fuzzy » Wed Mar 29, 2006 11:09 pm
Yes, although the depth sorting can be a little tricky.
On key down right arrow, go
[code]
x = x + 2;
y = y - 1;
[\code]
left arrow would be
[code]
x = x - 2;
y = y + 1;
[/code]
Up and down arrow would be the usual y = y - 1; or y = y + 1;
as far as laying out the grid, thats going to be harder! If you lay a hex grid base animation under all the tiles, it will facilitate laying out your map.
Each tile is going to need to keep track of its height. While you could use the depth variable, it might be better to design your own system using integers. When you do a key down event, check the destination tile and figure out of the height difference is low enough to allow movement. if not, disallow the movement.
Mortal Enemy of IF....THEN(and Inspector Gadget)
Still ThreeFingerPete to tekdino