In the scene I am creating, everytime the player moves one tile, all AI objects on the map also move one tile in a random direction (UP, DOWN, LEFT or RIGHT).
The problem I ran into is how do I stop two AI objects from moving into the same tile. Because they all move simultaneously when an event is dispatched by the player having finished its movement, I can’t quite figure out a solution to this.
I don’t need the code, just an idea on how it could be achieved.
Many thanks in advance.