I’m making a Turn-based Game and I’ve found a thing to change in pathfinding
I want to raise a priority depending on moving direction of a player when monsters decide their path from startPath.
* Z
* |
* |
*
* 6 2 5
* \ | /
* -- 3 - X - 1 ----- X
* / | \
* 7 0 4
*
* |
* |
Seeing the related post on ‘GridGenerator.cs’, I understood about moving of Path but I don’t know how to do what I want.
Is there any easy way to do this?
one monster(the left one) has two choice alternatives to go, to the right and above, but he always goes to the right regardless of player because the system has its fixed priority(down, right, above, left).
I want to fix this to make the monster decide his way depeding on a player’s choice.(If the player goes to the right, then the monster goes to the right also and if the player goes above, then the monster goes above)
I enclosed an image to make this clear.