Added two new fields for the highlight function. Each highlighted square now shows how far away it is from the current active object, as well as which direction:
1 = left, 2 = right, 3 = up, 4 = down
In the above picture, the computer AI selects an object based on highest range, determines the closest player object to it, and sets it as the target. Then it highlights all available moves the program can move:
However, what it needs to do next is construct a direction list so it knows how to move from its current square to the square closest to the target.
I call the PathToDestination function earlier (scroll up).
However, my "dirs" variable always equals "" and I'm not sure why. Can someone take a look?
@vee41 maybe? I know, I ask you too much :(
@R0J0hound, my events are based on your example, except instead of creating the squares on the board and then moving, I highlight the squares, then assign distance and direction variables only to the highlighted squares.BoardGame.capxExcal2013-09-17 07:20:16