Hi R0J0hound
Incredible !
Looks exactly how I was trying to achieve.
Stuff I have to adapt :
- Allow enemy to enter player hexagon so that they can fight
- Allow Player to enter Enemy hexagon, for the same reason
- Allow Player to move only X hexagons (maxmove)
- Make enemies move only when Player has used all its maxmove or if End Turn button is clicked.
I went through your code and came out with this
https://www.dropbox.com/s/wkzy10rnl7gj6jo/MoveHexChangeFromRojo.c3p?dl=0
I added :
- Player can move 5 hex maximum (variable can be adjusted)
- Player and Enemies move with Move to for smoother translation.
- I also managed to turn your debug routine to display reachable hexagons.
- Player moves only when click on hexagon within reaching distance
Problems so far
- Reaching distance sometimes fails to work properly when enemies are closed to the player. Some hexagons appear reachable as they are actually not. One of the enemies instance, the last instance (instance #3 when 4 enemies), makes the hexagon it's on funny : this hex has not O written on it as the others (see screencap) and I guess that is the reason why reachable hexagon map around it gets wrong.
Things I wasn't able to add :
- I didn't manage to allow player to enter enemy hex and enemies to enter player's hex.
- also, when the player only moves a number of hex below its max, enemues start to move. Before enemies move, I wanted to let the player move few hex then few more util it's moving points are exhausted but didn't succeed.
If you have any idea on how to fix this, I'd be grateful.