Closed ghost closed 9 months ago
The issue was resolved by checking in advance if the squares around the enemies were either a path tile or a regular tile (1 or 0 in map 2D array), and then turning appropriately.
The problem was apparently not resolved. We created a new map because the first one we used was just a trial map. In the actual map we created, we had multiple turns so the path tiles were too close together. When the enemies check for the surrounding squares, they detect the other path tiles close to them and assume they're still on the path when they need to turn.
We were able to resolve the issue by adding more if statements to further reinforce the code and make sure that all possibilities were covered when the enemies had to turn. To check if this issue was truly resolved, we changed the map multiple times and the enemies followed the path perfectly.
The enemies are not following the path we created for them. They are not turning in the correct spots. The enemies either turn the wrong direction or miss the turn completely.